Index: third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp |
diff --git a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp |
index 9ef36dc6860529ac2168ac77ac670d6186a40bae..8a41b18f1e98f0f6260cc1b1607b87c4a1d96796 100644 |
--- a/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp |
+++ b/third_party/WebKit/Source/core/page/ScopedPageLoadDeferrer.cpp |
@@ -32,18 +32,15 @@ namespace blink { |
ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion) |
{ |
- for (const Page* page : Page::ordinaryPages()) { |
+ for (Page* page : Page::ordinaryPages()) { |
if (page == exclusion || page->defersLoading()) |
continue; |
- |
- if (!page->mainFrame()->isLocalFrame()) |
- continue; |
- |
- m_deferredFrames.append(page->deprecatedLocalMainFrame()); |
+ m_deferredPages.append(page); |
// Ensure that we notify the client if the initial empty document is accessed before |
// showing anything modal, to prevent spoofs while the modal window or sheet is visible. |
- page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed(); |
+ if (page->mainFrame()->isLocalFrame()) |
+ page->deprecatedLocalMainFrame()->loader().notifyIfInitialDocumentAccessed(); |
} |
setDefersLoading(true); |
@@ -58,10 +55,9 @@ ScopedPageLoadDeferrer::~ScopedPageLoadDeferrer() |
void ScopedPageLoadDeferrer::setDefersLoading(bool isDeferred) |
{ |
- for (const auto& frame : m_deferredFrames) { |
- if (Page* page = frame->page()) |
- page->setDefersLoading(isDeferred); |
- } |
+ |
+ for (const auto& page : m_deferredPages) |
+ page->setDefersLoading(isDeferred); |
} |
} // namespace blink |