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 3a068491ea183ce0e7a95b227ac05de5758acde2..0a4ffe3ddea6f9ac88c215c49d1e76712c41970c 100644 |
--- a/third_party/WebKit/Source/core/page/Page.cpp |
+++ b/third_party/WebKit/Source/core/page/Page.cpp |
@@ -437,7 +437,8 @@ void Page::settingsChanged(SettingsDelegate::ChangeType changeType) { |
if (localFrame->loader() |
.stateMachine() |
->committedFirstRealDocumentLoad()) { |
- localFrame->script().initializeMainWorld(); |
+ // Forcibly instantiate WindowProxy. |
+ localFrame->script().windowProxy(DOMWrapperWorld::mainWorld()); |
} |
} |
} break; |