Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 3c2058c7a3b766c5a50e689a7b7e5737d88a10fb..01c7700242b2b2503af2973c31f7b94fd1fd1506 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1858,6 +1858,7 @@ Isolate::Isolate(bool enable_serializer) |
#if TRACE_MAPS |
next_unique_sfi_id_(0), |
#endif |
+ is_running_microtasks_(false), |
use_counter_callback_(NULL), |
basic_block_profiler_(NULL), |
cancelable_task_manager_(new CancelableTaskManager()), |
@@ -2780,7 +2781,9 @@ void Isolate::RunMicrotasks() { |
// Increase call depth to prevent recursive callbacks. |
v8::Isolate::SuppressMicrotaskExecutionScope suppress( |
reinterpret_cast<v8::Isolate*>(this)); |
+ is_running_microtasks_ = true; |
RunMicrotasksInternal(); |
+ is_running_microtasks_ = false; |
FireMicrotasksCompletedCallback(); |
} |