Index: src/debug.cc |
diff --git a/src/debug.cc b/src/debug.cc |
index 8b33087e046b70a66630d0773756571c90a21390..150664988969beae18d249a69b80889aff40a2c9 100644 |
--- a/src/debug.cc |
+++ b/src/debug.cc |
@@ -2571,6 +2571,8 @@ MaybeHandle<Object> Debug::MakeJSObject( |
isolate_->global_object(), constructor_str).ToHandleChecked(); |
ASSERT(constructor->IsJSFunction()); |
if (!constructor->IsJSFunction()) return MaybeHandle<Object>(); |
+ // We do not handle interrupts here. In particular, termination interrupts. |
+ PostponeInterruptsScope no_interrupts(isolate_); |
return Execution::TryCall( |
Handle<JSFunction>::cast(constructor), |
Handle<JSObject>(isolate_->debug()->debug_context()->global_object()), |
@@ -2907,6 +2909,9 @@ void Debug::NotifyMessageHandler(v8::DebugEvent event, |
Handle<JSObject> exec_state, |
Handle<JSObject> event_data, |
bool auto_continue) { |
+ // Prevent other interrupts from triggering, for example API callbacks, |
+ // while dispatching message handler callbacks. |
+ PostponeInterruptsScope no_interrupts(isolate_); |
ASSERT(is_active_); |
HandleScope scope(isolate_); |
// Process the individual events. |