diff options
-rw-r--r-- | common.gypi | 2 | ||||
-rw-r--r-- | deps/v8/src/debug/debug.cc | 8 |
2 files changed, 6 insertions, 4 deletions
diff --git a/common.gypi b/common.gypi index 4b1f0377ba..1e6d9ac0b0 100644 --- a/common.gypi +++ b/common.gypi @@ -27,7 +27,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.12', + 'v8_embedder_string': '-node.13', # Enable disassembler for `--print-code` v8 options 'v8_enable_disassembler': 1, diff --git a/deps/v8/src/debug/debug.cc b/deps/v8/src/debug/debug.cc index e2beaed6ab..966be62e63 100644 --- a/deps/v8/src/debug/debug.cc +++ b/deps/v8/src/debug/debug.cc @@ -338,13 +338,12 @@ bool Debug::Load() { void Debug::Unload() { ClearAllBreakPoints(); ClearStepping(); + if (FLAG_block_coverage) RemoveAllCoverageInfos(); RemoveDebugDelegate(); // Return debugger is not loaded. if (!is_loaded()) return; - if (FLAG_block_coverage) RemoveAllCoverageInfos(); - // Clear debugger context global handle. GlobalHandles::Destroy(Handle<Object>::cast(debug_context_).location()); debug_context_ = Handle<Context>(); @@ -643,8 +642,11 @@ void Debug::ApplyBreakPoints(Handle<DebugInfo> debug_info) { } void Debug::ClearBreakPoints(Handle<DebugInfo> debug_info) { + // If we attempt to clear breakpoints but none exist, simply return. This can + // happen e.g. CoverageInfos exit but no breakpoints are set. + if (!debug_info->HasDebugBytecodeArray()) return; + DisallowHeapAllocation no_gc; - DCHECK(debug_info->HasDebugBytecodeArray()); for (BreakIterator it(debug_info); !it.Done(); it.Next()) { it.ClearDebugBreak(); } |