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

Unified Diff: third_party/WebKit/Source/core/dom/Microtask.cpp

Issue 1745543002: Revert of Execute end of scope tasks in isolate's MicrotasksCompletedCallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
Index: third_party/WebKit/Source/core/dom/Microtask.cpp
diff --git a/third_party/WebKit/Source/core/dom/Microtask.cpp b/third_party/WebKit/Source/core/dom/Microtask.cpp
index 488c577f79f8dac4d4c285c74b6d0889169aa8b3..933dbe5091f2f44175fbf1c38f13dee7b04abd6f 100644
--- a/third_party/WebKit/Source/core/dom/Microtask.cpp
+++ b/third_party/WebKit/Source/core/dom/Microtask.cpp
@@ -31,6 +31,7 @@
#include "core/dom/Microtask.h"
#include "bindings/core/v8/V8PerIsolateData.h"
+#include "bindings/core/v8/V8RecursionScope.h"
#include "platform/ScriptForbiddenScope.h"
#include "platform/Task.h"
#include "public/platform/WebTaskRunner.h"
@@ -45,8 +46,17 @@
if (isolateData->recursionLevel() || isolateData->performingMicrotaskCheckpoint() || isolateData->destructionPending() || ScriptForbiddenScope::isScriptForbidden())
return;
isolateData->setPerformingMicrotaskCheckpoint(true);
- isolate->RunMicrotasks();
+ {
+ // Ensure that end-of-task-or-microtask actions are performed.
+ V8RecursionScope recursionScope(isolate);
+ isolate->RunMicrotasks();
+ }
isolateData->setPerformingMicrotaskCheckpoint(false);
+}
+
+bool Microtask::performingCheckpoint(v8::Isolate* isolate)
+{
+ return V8PerIsolateData::from(isolate)->performingMicrotaskCheckpoint();
}
static void microtaskFunctionCallback(void* data)
« no previous file with comments | « third_party/WebKit/Source/core/dom/Microtask.h ('k') | third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698