diff options
author | Michaël Zasso <targos@protonmail.com> | 2022-02-01 16:14:55 +0300 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2022-02-02 19:24:54 +0300 |
commit | 468fffdf66d36e99e7e2570750a4ffb0334df758 (patch) | |
tree | db6d66cc94562fc61c7e84fc13b92560a65428f5 /deps | |
parent | 48708be57b5fb9e08df242e273aeb80a82bc48fc (diff) |
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: https://github.com/v8/v8/commit/50d5fb7a457cf49ec4d8f8ed9e500c07b5465356
PR-URL: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/inspector/v8-debugger-agent-impl.cc | 2 | ||||
-rw-r--r-- | deps/v8/src/inspector/v8-debugger.cc | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/deps/v8/src/inspector/v8-debugger-agent-impl.cc b/deps/v8/src/inspector/v8-debugger-agent-impl.cc index 21c7f5f3c46..4f209360f9c 100644 --- a/deps/v8/src/inspector/v8-debugger-agent-impl.cc +++ b/deps/v8/src/inspector/v8-debugger-agent-impl.cc @@ -1141,10 +1141,10 @@ Response V8DebuggerAgentImpl::pause() { if (!enabled()) return Response::ServerError(kDebuggerNotEnabled); if (isPaused()) return Response::Success(); - pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr); if (m_debugger->canBreakProgram()) { m_debugger->interruptAndBreak(m_session->contextGroupId()); } else { + pushBreakDetails(protocol::Debugger::Paused::ReasonEnum::Other, nullptr); m_debugger->setPauseOnNextCall(true, m_session->contextGroupId()); } diff --git a/deps/v8/src/inspector/v8-debugger.cc b/deps/v8/src/inspector/v8-debugger.cc index e3f724b5a28..fc92a9c539c 100644 --- a/deps/v8/src/inspector/v8-debugger.cc +++ b/deps/v8/src/inspector/v8-debugger.cc @@ -215,7 +215,11 @@ void V8Debugger::interruptAndBreak(int targetContextGroupId) { DCHECK(targetContextGroupId); m_targetContextGroupId = targetContextGroupId; m_isolate->RequestInterrupt( - [](v8::Isolate* isolate, void*) { v8::debug::BreakRightNow(isolate); }, + [](v8::Isolate* isolate, void*) { + v8::debug::BreakRightNow( + isolate, + v8::debug::BreakReasons({v8::debug::BreakReason::kScheduled})); + }, nullptr); } |