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

Unified Diff: src/isolate.cc

Issue 291123002: Ensure that interruptor callback registered through API is called outside of ExecutionAccess lock. (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 | « src/execution.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 46f6d7128c102b3d978ff1c769339a13a3a063ed..82ace290cd5c2ee2a4249a9dd7201f61f7bcda10 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -842,10 +842,16 @@ void Isolate::CancelTerminateExecution() {
void Isolate::InvokeApiInterruptCallback() {
- InterruptCallback callback = api_interrupt_callback_;
- void* data = api_interrupt_callback_data_;
- api_interrupt_callback_ = NULL;
- api_interrupt_callback_data_ = NULL;
+ // Note: callback below should be called outside of execution access lock.
+ InterruptCallback callback = NULL;
+ void* data = NULL;
+ {
+ ExecutionAccess access(this);
+ callback = api_interrupt_callback_;
+ data = api_interrupt_callback_data_;
+ api_interrupt_callback_ = NULL;
+ api_interrupt_callback_data_ = NULL;
+ }
if (callback != NULL) {
VMState<EXTERNAL> state(this);
« no previous file with comments | « src/execution.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698