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

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

Issue 17063016: Remove leak of objects between isolated worlds on custom events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Added GC test Created 7 years, 6 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/dom/MessageEvent.cpp
diff --git a/Source/core/dom/MessageEvent.cpp b/Source/core/dom/MessageEvent.cpp
index 0e269d78d5607a01e471c438789ba9df09f7025b..cdbbac15d64a6813bfd2e2e6bb4a32a8e360d40f 100644
--- a/Source/core/dom/MessageEvent.cpp
+++ b/Source/core/dom/MessageEvent.cpp
@@ -46,19 +46,18 @@ MessageEvent::MessageEvent()
MessageEvent::MessageEvent(const AtomicString& type, const MessageEventInit& initializer)
: Event(type, initializer)
, m_dataType(DataTypeScriptValue)
- , m_dataAsScriptValue(initializer.data)
, m_origin(initializer.origin)
, m_lastEventId(initializer.lastEventId)
, m_source(initializer.source)
, m_ports(adoptPtr(new MessagePortArray(initializer.ports)))
+ , m_dataIsSet(initializer.dataIsSet)
{
ScriptWrappable::init(this);
}
-MessageEvent::MessageEvent(const ScriptValue& data, const String& origin, const String& lastEventId, PassRefPtr<DOMWindow> source, PassOwnPtr<MessagePortArray> ports)
+MessageEvent::MessageEvent(const String& origin, const String& lastEventId, PassRefPtr<DOMWindow> source, PassOwnPtr<MessagePortArray> ports)
: Event(eventNames().messageEvent, false, false)
, m_dataType(DataTypeScriptValue)
- , m_dataAsScriptValue(data)
, m_origin(origin)
, m_lastEventId(lastEventId)
, m_source(source)
@@ -115,7 +114,7 @@ MessageEvent::~MessageEvent()
{
}
-void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& data, const String& origin, const String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray> ports)
+void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& origin, const String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray> ports)
{
if (dispatched())
return;
@@ -123,7 +122,6 @@ void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo
initEvent(type, canBubble, cancelable);
m_dataType = DataTypeScriptValue;
- m_dataAsScriptValue = data;
m_origin = origin;
m_lastEventId = lastEventId;
m_source = source;

Powered by Google App Engine
This is Rietveld 408576698