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

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

Issue 1933033002: Don't run PerformCheckpoint on Document::finishedParsing while running JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 45a91520ec31434010ac96e70b77e51e429b7f9c..a0fd00b8116dd87ad31cb2a659c94249c9dc9148 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -4772,7 +4772,8 @@ void Document::finishedParsing()
// Ensure Custom Element callbacks are drained before DOMContentLoaded.
// FIXME: Remove this ad-hoc checkpoint when DOMContentLoaded is dispatched in a
// queued task, which will do a checkpoint anyway. https://crbug.com/425790
- Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate());
+ if (!V8PerIsolateData::mainThreadIsolate()->InContext())
+ Microtask::performCheckpoint(V8PerIsolateData::mainThreadIsolate());
if (LocalFrame* frame = this->frame()) {
// Don't update the layout tree if we haven't requested the main resource yet to avoid
« no previous file with comments | « third_party/WebKit/LayoutTests/inspector-protocol/runtime/runtime-promise-run-after-script-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698