| Index: third_party/WebKit/Source/core/page/Page.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp
|
| index 2f9b0c23b20f4912cdb19fe8c12c79f903c2d573..a0a1c592ffbd5d17c7dfc2469724bf49c74f3009 100644
|
| --- a/third_party/WebKit/Source/core/page/Page.cpp
|
| +++ b/third_party/WebKit/Source/core/page/Page.cpp
|
| @@ -421,17 +421,16 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType) {
|
| case SettingsDelegate::DOMWorldsChange: {
|
| if (!settings().forceMainWorldInitialization())
|
| break;
|
| - if (!mainFrame() || !mainFrame()->isLocalFrame())
|
| - break;
|
| - if (!toLocalFrame(mainFrame())
|
| - ->loader()
|
| - .stateMachine()
|
| - ->committedFirstRealDocumentLoad())
|
| - break;
|
| for (Frame* frame = mainFrame(); frame;
|
| frame = frame->tree().traverseNext()) {
|
| - if (frame->isLocalFrame())
|
| - toLocalFrame(frame)->script().initializeMainWorld();
|
| + if (!frame->isLocalFrame())
|
| + continue;
|
| + LocalFrame* localFrame = toLocalFrame(frame);
|
| + if (localFrame->loader()
|
| + .stateMachine()
|
| + ->committedFirstRealDocumentLoad()) {
|
| + localFrame->script().initializeMainWorld();
|
| + }
|
| }
|
| } break;
|
| }
|
|
|