Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: src/debug.cc

Issue 309533009: Release execution lock before dispatching interrupt handling. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/execution.h » ('j') | test/cctest/test-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | src/execution.h » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698