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

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

Issue 219003002: [ABANDONED] Call Microtask::performCheckpoint for each worker task. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
Index: Source/core/dom/Microtask.cpp
diff --git a/Source/core/dom/Microtask.cpp b/Source/core/dom/Microtask.cpp
index bbfb00df0df387155ff21d0dc56ec1f724c3547b..642907ef212aa14a11056792afc1c8714ebef508 100644
--- a/Source/core/dom/Microtask.cpp
+++ b/Source/core/dom/Microtask.cpp
@@ -48,6 +48,10 @@ void Microtask::performCheckpoint()
v8::HandleScope handleScope(isolate);
v8::Local<v8::Context> context = isolateData->ensureDomInJSContext();
+ if (context.IsEmpty()) {
+ // The script execution has been terminated.
+ return;
+ }
v8::Context::Scope scope(context);
v8::V8::RunMicrotasks(isolate);

Powered by Google App Engine
This is Rietveld 408576698