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

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

Issue 683013002: Extract a DOMWindow interface from LocalDOMWindow and use it in the idl. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix incorrect assumption Created 6 years, 1 month 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: Source/bindings/core/v8/V8Initializer.cpp
diff --git a/Source/bindings/core/v8/V8Initializer.cpp b/Source/bindings/core/v8/V8Initializer.cpp
index c015f4369ba6bc07caa1c6e6c5cabf3bde7b8558..c80be1ec04169c49f9e2ebb469d7d218be7be762 100644
--- a/Source/bindings/core/v8/V8Initializer.cpp
+++ b/Source/bindings/core/v8/V8Initializer.cpp
@@ -69,7 +69,10 @@ static LocalFrame* findFrame(v8::Local<v8::Object> host, v8::Local<v8::Value> da
v8::Handle<v8::Object> windowWrapper = V8Window::findInstanceInPrototypeChain(host, isolate);
if (windowWrapper.IsEmpty())
return 0;
- return V8Window::toImpl(windowWrapper)->frame();
+ DOMWindow* window = V8Window::toImpl(windowWrapper);
+ if (!window->isLocalDOMWindow())
+ return 0;
+ return toLocalDOMWindow(window)->frame();
}
if (V8History::wrapperTypeInfo.equals(type))
@@ -301,7 +304,7 @@ static void failedAccessCheckCallbackInMainThread(v8::Local<v8::Object> host, v8
LocalFrame* target = findFrame(host, data, isolate);
if (!target)
return;
haraken 2014/11/08 09:17:24 If the target window is a RemoteDOMWindow, this co
dcheng 2014/11/08 23:59:55 Done. For now, I had to make the functions to gene
- LocalDOMWindow* targetWindow = target->domWindow();
+ LocalDOMWindow* targetWindow = target->localDOMWindow();
// FIXME: We should modify V8 to pass in more contextual information (context, property, and object).
ExceptionState exceptionState(ExceptionState::UnknownContext, 0, 0, isolate->GetCurrentContext()->Global(), isolate);

Powered by Google App Engine
This is Rietveld 408576698