From a4e123fff602a3a87c4fc5b80116d8567723fd13 Mon Sep 17 00:00:00 2001 From: Cong Liu Date: Tue, 19 May 2015 21:53:15 +0800 Subject: [PATCH] Fixed nwjs/nw.js#3492 --- Source/bindings/core/v8/custom/V8WindowCustom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/Source/bindings/core/v8/custom/V8WindowCustom.cpp index f8f22ba9364..c574a2e666a 100644 --- a/Source/bindings/core/v8/custom/V8WindowCustom.cpp +++ b/Source/bindings/core/v8/custom/V8WindowCustom.cpp @@ -73,7 +73,7 @@ void V8Window::parentAttributeGetterCustom(const v8::PropertyCallbackInfoframe(); ASSERT(frame); - if (frame->isNwFakeTop()) { + if (frame && frame->isNwFakeTop()) { v8SetReturnValue(info, toV8(imp, info.Holder(), info.GetIsolate())); return; } @@ -160,7 +160,7 @@ void V8Window::frameElementAttributeGetterCustom(const v8::PropertyCallbackInfo< { LocalDOMWindow* impl = toLocalDOMWindow(V8Window::toImpl(info.Holder())); LocalFrame* frame = impl->frame(); - if (frame->isNwFakeTop()) + if (frame && frame->isNwFakeTop()) return; ExceptionState exceptionState(ExceptionState::GetterContext, "frame", "Window", info.Holder(), info.GetIsolate()); if (!BindingSecurity::shouldAllowAccessToNode(info.GetIsolate(), impl->frameElement(), exceptionState)) {