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) |