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

Unified Diff: Source/core/dom/MessageEvent.cpp

Issue 22915005: MessageEvent constructor should accept a MessagePort as source (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « Source/core/dom/MessageEvent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MessageEvent.cpp
diff --git a/Source/core/dom/MessageEvent.cpp b/Source/core/dom/MessageEvent.cpp
index bfbc96760418b9b76d5bb6c35e9661e7f014114f..351275ceea98cbbad2501f616afb7d7532f02755 100644
--- a/Source/core/dom/MessageEvent.cpp
+++ b/Source/core/dom/MessageEvent.cpp
@@ -53,7 +53,7 @@ MessageEvent::MessageEvent(const AtomicString& type, const MessageEventInit& ini
, m_dataType(DataTypeScriptValue)
, m_origin(initializer.origin)
, m_lastEventId(initializer.lastEventId)
- , m_source(initializer.source)
+ , m_source(isValidSource(initializer.source.get()) ? initializer.source : 0)
, m_ports(adoptPtr(new MessagePortArray(initializer.ports)))
{
ScriptWrappable::init(this);
« no previous file with comments | « Source/core/dom/MessageEvent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698