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

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: Fixed wrong method called Created 6 years, 2 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/loader/FrameLoader.cpp
diff --git a/Source/core/loader/FrameLoader.cpp b/Source/core/loader/FrameLoader.cpp
index 37d3db67ca3ef6d3766955301d8b4fe4d2314454..683c51a3855fa35bb8771516f2dd2b5073d8f671 100644
--- a/Source/core/loader/FrameLoader.cpp
+++ b/Source/core/loader/FrameLoader.cpp
@@ -164,6 +164,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(), m_deferredHistoryLoad.m_type, m_deferredHistoryLoad.m_cachePolicy);

Powered by Google App Engine
This is Rietveld 408576698