summaryrefslogtreecommitdiff
path: root/Source/WebCore/dom/MessageEvent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/dom/MessageEvent.cpp')
-rw-r--r--Source/WebCore/dom/MessageEvent.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/WebCore/dom/MessageEvent.cpp b/Source/WebCore/dom/MessageEvent.cpp
index 1252d2c64..24b52dd12 100644
--- a/Source/WebCore/dom/MessageEvent.cpp
+++ b/Source/WebCore/dom/MessageEvent.cpp
@@ -73,6 +73,10 @@ MessageEvent::MessageEvent(PassRefPtr<SerializedScriptValue> data, const String&
, m_source(source)
, m_ports(ports)
{
+#if USE(V8)
+ if (m_dataAsSerializedScriptValue)
+ m_dataAsSerializedScriptValue->registerMemoryAllocatedWithCurrentScriptContext();
+#endif
}
MessageEvent::MessageEvent(const String& data)
@@ -134,6 +138,11 @@ void MessageEvent::initMessageEvent(const AtomicString& type, bool canBubble, bo
m_lastEventId = lastEventId;
m_source = source;
m_ports = ports;
+
+#if USE(V8)
+ if (m_dataAsSerializedScriptValue)
+ m_dataAsSerializedScriptValue->registerMemoryAllocatedWithCurrentScriptContext();
+#endif
}
// FIXME: Remove this when we have custom ObjC binding support.