Chromium Code Reviews| 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 e330262b19fb0eb8426a68b995ee40a55ccb690f..e2ea33baa63b57e82e6e47517b82af9d463fefcb 100644 |
| --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp |
| @@ -1751,8 +1751,10 @@ void FrameLoader::dispatchDidClearDocumentOfWindowObject() { |
| return; |
| Settings* settings = m_frame->settings(); |
| - if (settings && settings->forceMainWorldInitialization()) |
| - m_frame->script().initializeMainWorld(); |
| + if (settings && settings->forceMainWorldInitialization()) { |
| + // Forcibly instantiate WindowProxy. |
|
Yuki
2017/01/05 12:10:06
This is a good comment!
Why don't we have similar
|
| + m_frame->script().windowProxy(DOMWrapperWorld::mainWorld()); |
| + } |
| InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); |
| if (m_dispatchingDidClearWindowObjectInMainWorld) |