Chromium Code Reviews| 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); |