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

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: Address comments 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') | no next file with comments »
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..5c6445408eb2f13a95415173d7baa67b19f357ed 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -291,13 +291,14 @@ 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();
+ ScriptWrappable* scriptWrappable = window->toScriptWrappable();
+ const WrapperTypeInfo* wrapperTypeInfo = scriptWrappable->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, scriptWrappable->toScriptWrappableBase());
// Install the windowWrapper as the prototype of the innerGlobalObject.
// The full structure of the global object is as follows:
@@ -312,9 +313,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, scriptWrappable->toScriptWrappableBase());
innerGlobalObject->SetPrototype(windowWrapper);
- V8DOMWrapper::associateObjectWithWrapperNonTemplate(window, wrapperTypeInfo, windowWrapper, m_isolate);
+ V8DOMWrapper::associateObjectWithWrapperNonTemplate(scriptWrappable, wrapperTypeInfo, windowWrapper, m_isolate);
wrapperTypeInfo->installConditionallyEnabledProperties(windowWrapper, m_isolate);
return true;
}
« no previous file with comments | « no previous file | Source/core/core.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698