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

Unified Diff: src/isolate.h

Issue 796623003: Support multiple interrupt requests in v8 API. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index a998d4dc7197834c558fbc9f74d36829a2a5c376..894950c5bab1458acc1fb873c8d2537f2cc799be 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -5,6 +5,7 @@
#ifndef V8_ISOLATE_H_
#define V8_ISOLATE_H_
+#include <queue>
#include "include/v8-debug.h"
#include "src/allocation.h"
#include "src/assert-scope.h"
@@ -390,8 +391,6 @@ typedef List<HeapObject*> DebugObjectCache;
V(bool, fp_stubs_generated, false) \
V(int, max_available_threads, 0) \
V(uint32_t, per_isolate_assert_data, 0xFFFFFFFFu) \
- V(InterruptCallback, api_interrupt_callback, NULL) \
- V(void*, api_interrupt_callback_data, NULL) \
V(PromiseRejectCallback, promise_reject_callback, NULL) \
ISOLATE_INIT_SIMULATOR_LIST(V)
@@ -814,7 +813,8 @@ class Isolate {
Object* TerminateExecution();
void CancelTerminateExecution();
- void InvokeApiInterruptCallback();
+ void RequestInterrupt(InterruptCallback callback, void* data);
+ void InvokeApiInterruptCallbacks();
// Administration
void Iterate(ObjectVisitor* v);
@@ -1292,6 +1292,9 @@ class Isolate {
HeapProfiler* heap_profiler_;
FunctionEntryHook function_entry_hook_;
+ typedef std::pair<InterruptCallback, void*> InterruptEntry;
+ std::queue<InterruptEntry> api_interrupts_queue_;
+
#define GLOBAL_BACKING_STORE(type, name, initialvalue) \
type name##_;
ISOLATE_INIT_LIST(GLOBAL_BACKING_STORE)
« no previous file with comments | « src/execution.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698