Skip to content

Commit f74184e

Browse files
committed
deps: V8: cherry-pick 50d5fb7a457c
Original commit message: [debugger] Pass break reason for interrupt along with BreakRightNow This explicitly passes along the break reason when requesting a pause that is handled via an interrupt. Pushing the break reason is not enough (as done before), as the reason may be used and consumed on another pause call that triggers a setPauseOnNextCall. Fixed: chromium:1292519 Change-Id: If8635c9397a7b9a1e6757be8048c9edc613c27f8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3427208 Reviewed-by: Jaroslav Sevcik <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]> Auto-Submit: Kim-Anh Tran <[email protected]> Cr-Commit-Position: refs/heads/main@{#78885} Refs: v8/v8@50d5fb7 PR-URL: nodejs#41610 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent d18d1e9 commit f74184e

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.10',
39+
'v8_embedder_string': '-node.11',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/src/inspector/v8-debugger-agent-impl.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,10 @@ Response V8DebuggerAgentImpl::pause() {
11411141
if (!enabled()) return Response::ServerError(kDebuggerNotEnabled);
11421142
if (isPaused()) return Response::Success();
11431143

1144-
pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr);
11451144
if (m_debugger->canBreakProgram()) {
11461145
m_debugger->interruptAndBreak(m_session->contextGroupId());
11471146
} else {
1147+
pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr);
11481148
m_debugger->setPauseOnNextCall(true, m_session->contextGroupId());
11491149
}
11501150

deps/v8/src/inspector/v8-debugger.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@ void V8Debugger::interruptAndBreak(int targetContextGroupId) {
217217
DCHECK(targetContextGroupId);
218218
m_targetContextGroupId = targetContextGroupId;
219219
m_isolate->RequestInterrupt(
220-
[](v8::Isolate* isolate, void*) { v8::debug::BreakRightNow(isolate); },
220+
[](v8::Isolate* isolate, void*) {
221+
v8::debug::BreakRightNow(
222+
isolate,
223+
v8::debug::BreakReasons({v8::debug::BreakReason::kScheduled}));
224+
},
221225
nullptr);
222226
}
223227

0 commit comments

Comments
 (0)