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

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

Issue 640803004: Add a basic DOMWindow base class and use it in WindowProxy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move the member too Created 6 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 | « no previous file | Source/core/core.gypi » ('j') | Source/core/frame/DOMWindow.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index a2bf042635c77f32a95a3e89b9b10dfee79f5185..94ae57e52f2769edee0ca47e0dbaaef98570c325 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -291,13 +291,13 @@ static v8::Handle<v8::Object> toInnerGlobalObject(v8::Handle<v8::Context> contex
bool WindowProxy::installDOMWindow()
{
- LocalDOMWindow* window = m_frame->domWindow();
- const WrapperTypeInfo* wrapperTypeInfo = window->wrapperTypeInfo();
+ DOMWindow* window = m_frame->domWindow();
Yuki 2014/10/23 06:03:34 ScriptWrappable* scriptWrappable = m_frame->domWin
dcheng 2014/10/23 06:48:46 Yeah, makes sense to alias it. Done.
+ const WrapperTypeInfo* wrapperTypeInfo = window->toScriptWrappable()->wrapperTypeInfo();
v8::Local<v8::Object> windowWrapper = V8ObjectConstructor::newInstance(m_isolate, m_scriptState->perContextData()->constructorForType(wrapperTypeInfo));
if (windowWrapper.IsEmpty())
return false;
- V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object>::Cast(windowWrapper->GetPrototype()), wrapperTypeInfo, window->toScriptWrappableBase());
+ V8DOMWrapper::setNativeInfo(v8::Handle<v8::Object>::Cast(windowWrapper->GetPrototype()), wrapperTypeInfo, window->toScriptWrappable()->toScriptWrappableBase());
// Install the windowWrapper as the prototype of the innerGlobalObject.
// The full structure of the global object is as follows:
@@ -312,9 +312,9 @@ bool WindowProxy::installDOMWindow()
// outer, inner, and LocalDOMWindow instance all appear to be the same
// JavaScript object.
v8::Handle<v8::Object> innerGlobalObject = toInnerGlobalObject(m_scriptState->context());
- V8DOMWrapper::setNativeInfo(innerGlobalObject, wrapperTypeInfo, window->toScriptWrappableBase());
+ V8DOMWrapper::setNativeInfo(innerGlobalObject, wrapperTypeInfo, window->toScriptWrappable()->toScriptWrappableBase());
innerGlobalObject->SetPrototype(windowWrapper);
- V8DOMWrapper::associateObjectWithWrapperNonTemplate(window, wrapperTypeInfo, windowWrapper, m_isolate);
+ V8DOMWrapper::associateObjectWithWrapperNonTemplate(window->toScriptWrappable(), wrapperTypeInfo, windowWrapper, m_isolate);
wrapperTypeInfo->installConditionallyEnabledProperties(windowWrapper, m_isolate);
return true;
}
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | Source/core/frame/DOMWindow.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698