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

Unified Diff: Source/core/loader/FrameLoader.cpp

Issue 625583002: Properly suspend HTMLDocumentParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years 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 | « Source/core/html/parser/HTMLParserScheduler.cpp ('k') | Source/core/page/ScopedPageLoadDeferrer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 237555cbb15f44910867d68965b64e7a8623e7a5..4aba7e98ee540e86b007fb6f6844c686bb5320cf 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -166,6 +166,13 @@ void FrameLoader::setDefersLoading(bool defers)
if (m_policyDocumentLoader)
m_policyDocumentLoader->setDefersLoading(defers);
+ if (Document* document = m_frame->document()) {
+ if (defers)
+ document->suspendScheduledTasks();
+ else
+ document->resumeScheduledTasks();
+ }
+
if (!defers) {
if (m_deferredHistoryLoad.isValid()) {
loadHistoryItem(m_deferredHistoryLoad.m_item.get(), FrameLoadTypeBackForward,
« no previous file with comments | « Source/core/html/parser/HTMLParserScheduler.cpp ('k') | Source/core/page/ScopedPageLoadDeferrer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698