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

Unified Diff: Source/core/page/ScopedPageLoadDeferrer.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/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/ScopedPageLoadDeferrer.cpp
diff --git a/Source/core/page/ScopedPageLoadDeferrer.cpp b/Source/core/page/ScopedPageLoadDeferrer.cpp
index f1241ede623350480c160974469ed6e7a7ecab60..46c47b0c001fa335a90ba8ec1bd8b0e213333028 100644
--- a/Source/core/page/ScopedPageLoadDeferrer.cpp
+++ b/Source/core/page/ScopedPageLoadDeferrer.cpp
@@ -43,13 +43,6 @@ ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion)
// showing anything modal, to prevent spoofs while the modal window or sheet is visible.
page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed();
}
-
- // This code is not logically part of load deferring, but we do not want JS code executed
- // beneath modal windows or sheets, which is exactly when ScopedPageLoadDeferrer is used.
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- toLocalFrame(frame)->document()->suspendScheduledTasks();
- }
}
size_t count = m_deferredFrames.size();
@@ -62,14 +55,8 @@ ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion)
void ScopedPageLoadDeferrer::detach()
{
for (size_t i = 0; i < m_deferredFrames.size(); ++i) {
- if (Page* page = m_deferredFrames[i]->page()) {
+ if (Page* page = m_deferredFrames[i]->page())
page->setDefersLoading(false);
-
- for (Frame* frame = page->mainFrame(); frame; frame = frame->tree().traverseNext()) {
- if (frame->isLocalFrame())
- toLocalFrame(frame)->document()->resumeScheduledTasks();
- }
- }
}
}
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698