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

Unified Diff: Source/core/workers/SharedWorkerGlobalScope.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/core/workers/SharedWorkerGlobalScope.cpp
diff --git a/Source/core/workers/SharedWorkerGlobalScope.cpp b/Source/core/workers/SharedWorkerGlobalScope.cpp
index fe229eb0f97503c4c50b54e799ee37b9c0838c23..99453752e106a5855373c25c89eec8ac83727238 100644
--- a/Source/core/workers/SharedWorkerGlobalScope.cpp
+++ b/Source/core/workers/SharedWorkerGlobalScope.cpp
@@ -45,7 +45,8 @@ namespace WebCore {
PassRefPtr<MessageEvent> createConnectEvent(PassRefPtr<MessagePort> port)
{
- RefPtr<MessageEvent> event = MessageEvent::create(adoptPtr(new MessagePortArray(1, port)));
+ RefPtr<MessagePort> sourcePort = port;
+ RefPtr<MessageEvent> event = MessageEvent::create(adoptPtr(new MessagePortArray(1, sourcePort)), "", "", sourcePort);
event->initEvent(eventNames().connectEvent, false, false);
return event.release();
}

Powered by Google App Engine
This is Rietveld 408576698