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

Unified Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 23319002: Set MessageEvent.source to the newly created port for shared workers' connect events (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add test and assertions Created 7 years, 4 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
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));
}

Powered by Google App Engine
This is Rietveld 408576698