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 eb6c5d4f38a78873680b374a1ad6a6bc55f1b461..88dd7713fa96e30da6e480eefe14581fd3f0fe9f 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp |
@@ -77,9 +77,6 @@ |
namespace blink { |
-ScriptController::ScriptController(LocalFrame* frame) |
- : m_windowProxyManager(LocalWindowProxyManager::create(*frame)) {} |
- |
DEFINE_TRACE(ScriptController) { |
visitor->trace(m_windowProxyManager); |
} |
@@ -160,12 +157,6 @@ v8::Local<v8::Value> ScriptController::executeScriptAndReturnValue( |
return result; |
} |
-LocalWindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world) { |
- LocalWindowProxy* windowProxy = m_windowProxyManager->windowProxy(world); |
- windowProxy->initializeIfNeeded(); |
- return windowProxy; |
-} |
- |
bool ScriptController::shouldBypassMainWorldCSP() { |
v8::HandleScope handleScope(isolate()); |
v8::Local<v8::Context> context = isolate()->GetCurrentContext(); |
@@ -187,7 +178,8 @@ TextPosition ScriptController::eventHandlerPosition() const { |
void ScriptController::enableEval() { |
v8::HandleScope handleScope(isolate()); |
v8::Local<v8::Context> v8Context = |
- m_windowProxyManager->mainWorldProxy()->contextIfInitialized(); |
+ m_windowProxyManager->mainWorldProxyMaybeUninitialized() |
+ ->contextIfInitialized(); |
if (v8Context.IsEmpty()) |
return; |
v8Context->AllowCodeGenerationFromStrings(true); |
@@ -196,7 +188,8 @@ void ScriptController::enableEval() { |
void ScriptController::disableEval(const String& errorMessage) { |
v8::HandleScope handleScope(isolate()); |
v8::Local<v8::Context> v8Context = |
- m_windowProxyManager->mainWorldProxy()->contextIfInitialized(); |
+ m_windowProxyManager->mainWorldProxyMaybeUninitialized() |
+ ->contextIfInitialized(); |
if (v8Context.IsEmpty()) |
return; |
v8Context->AllowCodeGenerationFromStrings(false); |
@@ -244,7 +237,7 @@ void ScriptController::clearWindowProxy() { |
} |
void ScriptController::updateDocument() { |
- m_windowProxyManager->mainWorldProxy()->updateDocument(); |
+ m_windowProxyManager->mainWorldProxyMaybeUninitialized()->updateDocument(); |
} |
bool ScriptController::executeScriptIfJavaScriptURL(const KURL& url, |