| 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 92ea7c6200672063607bd4b8fecf85262199fb76..8c407a0b64c10167d7c0f68f688804454bad4ac2 100644
|
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
|
| @@ -263,6 +263,7 @@ DEFINE_TRACE(FrameLoader) {
|
| }
|
|
|
| void FrameLoader::Init() {
|
| + ScriptForbiddenScope forbid_scripts;
|
| ResourceRequest initial_request(KURL(kParsedURLString, g_empty_string));
|
| initial_request.SetRequestContext(WebURLRequest::kRequestContextInternal);
|
| initial_request.SetFrameType(frame_->IsMainFrame()
|
| @@ -275,14 +276,10 @@ void FrameLoader::Init() {
|
| frame_->GetDocument()->CancelParsing();
|
| state_machine_.AdvanceTo(
|
| FrameLoaderStateMachine::kDisplayingInitialEmptyDocument);
|
| - // Suppress finish notifications for inital empty documents, since they don't
|
| + // Suppress finish notifications for initial empty documents, since they don't
|
| // generate start notifications.
|
| - if (document_loader_)
|
| - document_loader_->SetSentDidFinishLoad();
|
| - // 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 (frame_->GetPage() && frame_->GetPage()->Suspended())
|
| + document_loader_->SetSentDidFinishLoad();
|
| + if (frame_->GetPage()->Suspended())
|
| SetDefersLoading(true);
|
| TakeObjectSnapshot();
|
| }
|
|
|