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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp

Issue 1431963002: Don't allow main world initialization while creating the initial empty document Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « chrome/test/data/extensions/api_test/bindings/chromei18nrepro/window.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
index 4a354bc7fb70624629aa131c0352746359a4041c..bfba263c2257f9f3edbd7a07e4f22c6dc7e4db04 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -198,7 +198,7 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue(v8::Local<v8:
bool ScriptController::initializeMainWorld()
{
- if (m_windowProxyManager->mainWorldProxy()->isContextInitialized())
+ if (m_windowProxyManager->mainWorldProxy()->isContextInitialized() || frame()->loader().stateMachine()->creatingInitialEmptyDocument())
return false;
return windowProxy(DOMWrapperWorld::mainWorld())->isContextInitialized();
}
« no previous file with comments | « chrome/test/data/extensions/api_test/bindings/chromei18nrepro/window.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698