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

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

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: Minor rebase nits. Created 7 years, 5 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/CustomEvent.idl ('k') | Source/core/dom/MessageEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/MessageEvent.h
diff --git a/Source/core/dom/MessageEvent.h b/Source/core/dom/MessageEvent.h
index 5912f8ff0cb9c1bd5cf9e37341c0d7fef00a80d6..f43164a6c3ff17258db5b04f97543351bce4e91a 100644
--- a/Source/core/dom/MessageEvent.h
+++ b/Source/core/dom/MessageEvent.h
@@ -28,7 +28,6 @@
#ifndef MessageEvent_h
#define MessageEvent_h
-#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/SerializedScriptValue.h"
#include "core/dom/Event.h"
#include "core/dom/MessagePort.h"
@@ -43,7 +42,6 @@ class DOMWindow;
struct MessageEventInit : public EventInit {
MessageEventInit();
- ScriptValue data;
String origin;
String lastEventId;
RefPtr<DOMWindow> source;
@@ -56,9 +54,9 @@ public:
{
return adoptRef(new MessageEvent);
}
- static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, const ScriptValue& data = ScriptValue(), const String& origin = "", const String& lastEventId = "", PassRefPtr<DOMWindow> source = 0)
+ static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, const String& origin = "", const String& lastEventId = "", PassRefPtr<DOMWindow> source = 0)
{
- return adoptRef(new MessageEvent(data, origin, lastEventId, source, ports));
+ return adoptRef(new MessageEvent(origin, lastEventId, source, ports));
}
static PassRefPtr<MessageEvent> create(PassOwnPtr<MessagePortArray> ports, PassRefPtr<SerializedScriptValue> data, const String& origin = "", const String& lastEventId = "", PassRefPtr<DOMWindow> source = 0)
{
@@ -82,7 +80,7 @@ public:
}
virtual ~MessageEvent();
- void initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, const ScriptValue& data, const String& origin, const String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray>);
+ void initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, const String& origin, const String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray>);
void initMessageEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, DOMWindow* source, PassOwnPtr<MessagePortArray>);
const String& origin() const { return m_origin; }
@@ -100,7 +98,6 @@ public:
DataTypeArrayBuffer
};
DataType dataType() const { return m_dataType; }
- const ScriptValue& dataAsScriptValue() const { ASSERT(m_dataType == DataTypeScriptValue); return m_dataAsScriptValue; }
PassRefPtr<SerializedScriptValue> dataAsSerializedScriptValue() const { ASSERT(m_dataType == DataTypeSerializedScriptValue); return m_dataAsSerializedScriptValue; }
String dataAsString() const { ASSERT(m_dataType == DataTypeString); return m_dataAsString; }
Blob* dataAsBlob() const { ASSERT(m_dataType == DataTypeBlob); return m_dataAsBlob.get(); }
@@ -109,7 +106,7 @@ public:
private:
MessageEvent();
MessageEvent(const AtomicString&, const MessageEventInit&);
- MessageEvent(const ScriptValue& data, const String& origin, const String& lastEventId, PassRefPtr<DOMWindow> source, PassOwnPtr<MessagePortArray>);
+ MessageEvent(const String& origin, const String& lastEventId, PassRefPtr<DOMWindow> source, PassOwnPtr<MessagePortArray>);
MessageEvent(PassRefPtr<SerializedScriptValue> data, const String& origin, const String& lastEventId, PassRefPtr<DOMWindow> source, PassOwnPtr<MessagePortArray>);
explicit MessageEvent(const String& data, const String& origin);
@@ -117,7 +114,6 @@ private:
explicit MessageEvent(PassRefPtr<ArrayBuffer> data, const String& origin);
DataType m_dataType;
- ScriptValue m_dataAsScriptValue;
RefPtr<SerializedScriptValue> m_dataAsSerializedScriptValue;
String m_dataAsString;
RefPtr<Blob> m_dataAsBlob;
« no previous file with comments | « Source/core/dom/CustomEvent.idl ('k') | Source/core/dom/MessageEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698