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); |