Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(606)

Unified Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2151573002: [DevTools] Fix window object init on chrome://* pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9aef6de6289d0a67ca59036a9ed386ce55120b07..3488d75c8c5dc32a8404a113d9e37b81ff3d988f 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -1542,6 +1542,9 @@ void FrameLoader::dispatchDidClearDocumentOfWindowObject()
if (!m_frame->script().canExecuteScripts(NotAboutToExecuteScript))
return;
+ Settings* settings = m_frame->settings();
+ if (settings && settings->forceMainWorldInitialization())
+ m_frame->script().initializeMainWorld();
InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame);
if (m_dispatchingDidClearWindowObjectInMainWorld)
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp ('k') | third_party/WebKit/Source/devtools/front_end/Tests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698