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

Unified Diff: src/isolate.cc

Issue 1920813002: [api] Introduce MicrotasksScope::IsRunningMicrotasks (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/isolate.h ('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 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();
}
« no previous file with comments | « src/isolate.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698