From 70dc24c22ff61b4b4d5a9f43597bdbb067b35304 Mon Sep 17 00:00:00 2001 From: yurys Date: Mon, 31 Aug 2015 15:32:46 -0700 Subject: [PATCH] Postpone interrupts while dipatching debugger events to listeners The interrupts are already postponed in message handlers [1]. This CL aligns debug event listener (the mechanism that is actually used in Chrome DevTools) implementation with that. Handling interrupts on events like v8::AfterCompile leads to crashes like the one in the lined bug. This happens because in the interrupt handler we may change debugger state. [1] https://codereview.chromium.org/309533009/diff/40001/src/debug.cc BUG=chromium:520702 LOG=Y Review URL: https://codereview.chromium.org/1321263002 Cr-Commit-Position: refs/heads/master@{#30488} --- src/debug/debug.cc | 7 ++++++- test/cctest/test-debug.cc | 24 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/debug/debug.cc b/src/debug/debug.cc index de7cc23..297156f 100644 --- a/src/debug/debug.cc +++ b/src/debug/debug.cc @@ -1815,6 +1815,7 @@ void Debug::OnException(Handle exception, Handle promise) { void Debug::OnCompileError(Handle