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

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

Issue 2630693002: Make ScriptController inherit LocalWindowProxyManager
Patch Set: rebase Created 3 years, 11 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/bindings/core/v8/WindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
index b750f2657faee14354032ea38feadde1dac1085d..d9875966456352c1fcdc9c5254758ac837857b29 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -100,13 +100,10 @@ void WindowProxy::clearForNavigation() {
disposeContext(DetachGlobal);
}
-v8::Local<v8::Object> WindowProxy::globalIfNotDetached() {
- if (m_lifecycle == Lifecycle::ContextInitialized) {
- DCHECK(m_scriptState->contextIsValid());
- DCHECK(m_globalProxy == m_scriptState->context()->Global());
- return m_globalProxy.newLocal(m_isolate);
- }
- return v8::Local<v8::Object>();
+v8::Local<v8::Object> WindowProxy::globalProxy() {
+ if (m_frame->client())
+ initializeIfNeeded();
+ return m_globalProxy.newLocal(m_isolate);
}
v8::Local<v8::Object> WindowProxy::releaseGlobal() {
@@ -122,6 +119,8 @@ v8::Local<v8::Object> WindowProxy::releaseGlobal() {
}
void WindowProxy::setGlobal(v8::Local<v8::Object> global) {
+ DCHECK(m_lifecycle == Lifecycle::ContextUninitialized);
+
m_globalProxy.set(m_isolate, global);
// Initialize the window proxy now, to re-establish the connection between

Powered by Google App Engine
This is Rietveld 408576698