Index: src/isolate.h |
diff --git a/src/isolate.h b/src/isolate.h |
index d94fc4d9ba66f1223f2c6f359b96dd22c746ed21..0d6494604edb8956bb48ac014abf51a2d995fd2e 100644 |
--- a/src/isolate.h |
+++ b/src/isolate.h |
@@ -1243,6 +1243,11 @@ class Isolate { |
// reset to nullptr. |
void UnregisterFromReleaseAtTeardown(ManagedObjectFinalizer** finalizer_ptr); |
+ // Used by mjsunit tests to force d8 to wait for certain things to run. |
+ inline void IncrementWaitCountForTesting() { wait_count_++; } |
+ inline void DecrementWaitCountForTesting() { wait_count_--; } |
+ inline int GetWaitCountForTesting() { return wait_count_; } |
+ |
protected: |
explicit Isolate(bool enable_serializer); |
bool IsArrayOrObjectPrototype(Object* object); |
@@ -1524,6 +1529,8 @@ class Isolate { |
size_t total_regexp_code_generated_; |
+ int wait_count_ = 0; |
+ |
friend class ExecutionAccess; |
friend class HandleScopeImplementer; |
friend class HeapTester; |