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

Unified Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2392843002: Remove WindowProxy::isGlobalInitialized(). (DO NOT COMMIT YET) (Closed)
Patch Set: . Created 4 years, 2 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('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/web/WebLocalFrameImpl.cpp
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 91cd54ae1ec8bff1696e166fe3112d5eb6211eea..9a0206874dbcde8f6e8613341c3262cacb00682d 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -98,6 +98,7 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8PerIsolateData.h"
+#include "bindings/core/v8/WindowProxy.h"
#include "core/HTMLNames.h"
#include "core/dom/Document.h"
#include "core/dom/IconURL.h"
@@ -847,9 +848,9 @@ v8::Local<v8::Value> WebLocalFrameImpl::callFunctionEvenIfScriptDisabled(
}
v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const {
- ScriptState* scriptState = ScriptState::forMainWorld(frame());
- DCHECK(scriptState);
- return scriptState->context();
+ WindowProxy* windowProxy = frame()->getWindowProxyManager()->mainWorldProxy();
+ windowProxy->initializeIfNeeded();
+ return windowProxy->getScriptState()->context();
}
bool WebFrame::scriptCanAccess(WebFrame* target) {
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalFrame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698