| Index: third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| index 59426dd8146ebbc2ff770d250539ebfa8f54c7a1..86e0bd9574653dbdf768741d4e7d807eb8d20037 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -231,8 +231,11 @@ void FrameLoader::init() {
|
| // Self-suspend if created in an already suspended Page. Note that both
|
| // startLoadingMainResource() and cancelParsing() may have already detached
|
| // the frame, since they both fire JS events.
|
| - if (m_frame->page() && m_frame->page()->suspended())
|
| + if (m_frame->page() && m_frame->page()->suspended()) {
|
| + m_provisionalDocumentLoader->fetcher()->setDefersLoading(true);
|
| + m_frame->document()->suspendScheduledTasks();
|
| setDefersLoading(true);
|
| + }
|
| takeObjectSnapshot();
|
| }
|
|
|
| @@ -244,14 +247,6 @@ void FrameLoader::setDefersLoading(bool defers) {
|
| if (m_provisionalDocumentLoader)
|
| m_provisionalDocumentLoader->fetcher()->setDefersLoading(defers);
|
|
|
| - if (Document* document = m_frame->document()) {
|
| - document->fetcher()->setDefersLoading(defers);
|
| - if (defers)
|
| - document->suspendScheduledTasks();
|
| - else
|
| - document->resumeScheduledTasks();
|
| - }
|
| -
|
| if (!defers) {
|
| if (m_deferredHistoryLoad) {
|
| load(FrameLoadRequest(nullptr, m_deferredHistoryLoad->m_request),
|
|
|