Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: cherry-pick 1420e44db0 from upstream V8 #17344

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 5 additions & 3 deletions deps/v8/src/debug/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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>();
Expand Down Expand Up @@ -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();
}
Expand Down