Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9f282dd

Browse filesBrowse files
TimothyGuMylesBorins
authored andcommitted
deps: cherry-pick 1420e44db0 from upstream V8
Original commit message: [coverage] Correctly free DebugInfo in the absence of breakpoints It's quite possible for DebugInfos to exist without the presence of a bytecode array, since DebugInfos are created for all functions for which we have a CoverageInfo. Free such objects properly. Also move the corresponding deletion of CoverageInfos on unload up before the early exit. Bug: v8:6000 Change-Id: Idde45b222290aa8b6828b61ff2251918b8ed2aed Reviewed-on: https://chromium-review.googlesource.com/664811 Reviewed-by: Yang Guo <yangguo@chromium.org> Commit-Queue: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#48024} Fixes crash when passing Profiler.startPreciseCoverage before Debug.paused is received. PR-URL: #17344 Refs: v8/v8@1420e44 Refs: bcoe/c8#6 (comment) Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 6a7a59a commit 9f282dd
Copy full SHA for 9f282dd

File tree

Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-4
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
# Reset this number to 0 on major V8 upgrades.
2929
# Increment by one for each non-official patch applied to deps/v8.
30-
'v8_embedder_string': '-node.14',
30+
'v8_embedder_string': '-node.15',
3131

3232
# Enable disassembler for `--print-code` v8 options
3333
'v8_enable_disassembler': 1,
Collapse file

‎deps/v8/src/debug/debug.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/debug/debug.cc
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,12 @@ bool Debug::Load() {
338338
void Debug::Unload() {
339339
ClearAllBreakPoints();
340340
ClearStepping();
341+
if (FLAG_block_coverage) RemoveAllCoverageInfos();
341342
RemoveDebugDelegate();
342343

343344
// Return debugger is not loaded.
344345
if (!is_loaded()) return;
345346

346-
if (FLAG_block_coverage) RemoveAllCoverageInfos();
347-
348347
// Clear debugger context global handle.
349348
GlobalHandles::Destroy(Handle<Object>::cast(debug_context_).location());
350349
debug_context_ = Handle<Context>();
@@ -643,8 +642,11 @@ void Debug::ApplyBreakPoints(Handle<DebugInfo> debug_info) {
643642
}
644643

645644
void Debug::ClearBreakPoints(Handle<DebugInfo> debug_info) {
645+
// If we attempt to clear breakpoints but none exist, simply return. This can
646+
// happen e.g. CoverageInfos exit but no breakpoints are set.
647+
if (!debug_info->HasDebugBytecodeArray()) return;
648+
646649
DisallowHeapAllocation no_gc;
647-
DCHECK(debug_info->HasDebugBytecodeArray());
648650
for (BreakIterator it(debug_info); !it.Done(); it.Next()) {
649651
it.ClearDebugBreak();
650652
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.