Skip to content

Commit 468fffd

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 <jarin@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org> Auto-Submit: Kim-Anh Tran <kimanh@chromium.org> Cr-Commit-Position: refs/heads/main@{#78885} Refs: v8/v8@50d5fb7 PR-URL: #41610 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 48708be commit 468fffd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

common.gypi

+1-1
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.11',
39+
'v8_embedder_string': '-node.12',
4040

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

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

+1-1
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

+5-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,11 @@ void V8Debugger::interruptAndBreak(int targetContextGroupId) {
215215
DCHECK(targetContextGroupId);
216216
m_targetContextGroupId = targetContextGroupId;
217217
m_isolate->RequestInterrupt(
218-
[](v8::Isolate* isolate, void*) { v8::debug::BreakRightNow(isolate); },
218+
[](v8::Isolate* isolate, void*) {
219+
v8::debug::BreakRightNow(
220+
isolate,
221+
v8::debug::BreakReasons({v8::debug::BreakReason::kScheduled}));
222+
},
219223
nullptr);
220224
}
221225

0 commit comments

Comments
 (0)