| Index: Source/core/page/ScopedPageLoadDeferrer.cpp
|
| diff --git a/Source/core/page/ScopedPageLoadDeferrer.cpp b/Source/core/page/ScopedPageLoadDeferrer.cpp
|
| index 1387aef793672fcdcf376fd39504212cb4b80322..d911587a66b732365766bfe0691b92a3f7fd0113 100644
|
| --- a/Source/core/page/ScopedPageLoadDeferrer.cpp
|
| +++ b/Source/core/page/ScopedPageLoadDeferrer.cpp
|
| @@ -41,11 +41,13 @@ ScopedPageLoadDeferrer::ScopedPageLoadDeferrer(Page* exclusion)
|
| if (page == exclusion || page->defersLoading())
|
| continue;
|
|
|
| - m_deferredFrames.append(page->mainFrame());
|
| + if (page->mainFrame()->isLocalFrame()) {
|
| + m_deferredFrames.append(toLocalFrame(page->mainFrame()));
|
|
|
| - // 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->mainFrame()->loader().notifyIfInitialDocumentAccessed();
|
| + // 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.
|
| + toLocalFrame(page->mainFrame())->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.
|
|
|