Index: Source/web/FrameLoaderClientImpl.cpp |
diff --git a/Source/web/FrameLoaderClientImpl.cpp b/Source/web/FrameLoaderClientImpl.cpp |
index 640bfb2563c9775547a3ae451ebbf25edf0fc5ad..054adb456c53992d51ddc490a5af03955431f4d9 100644 |
--- a/Source/web/FrameLoaderClientImpl.cpp |
+++ b/Source/web/FrameLoaderClientImpl.cpp |
@@ -739,8 +739,8 @@ bool FrameLoaderClientImpl::willCheckAndDispatchMessageEvent( |
return false; |
WebFrame* source = 0; |
- if (event && event->source() && event->source()->document()) |
- source = WebFrameImpl::fromFrame(event->source()->document()->frame()); |
+ if (event && event->source() && event->source()->toDOMWindow() && event->source()->toDOMWindow()->document()) |
+ source = WebFrameImpl::fromFrame(event->source()->toDOMWindow()->document()->frame()); |
return m_webFrame->client()->willCheckAndDispatchMessageEvent( |
source, m_webFrame, WebSecurityOrigin(target), WebDOMMessageEvent(event)); |
} |