summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp b/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
index 80ab7c8eb7..d668703861 100644
--- a/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/default/PlatformMessagePortChannel.cpp
@@ -37,6 +37,27 @@
namespace WebCore {
// MessagePortChannel implementations - just delegate to the PlatformMessagePortChannel.
+void MessagePortChannel::createChannel(PassRefPtr<MessagePort> port1, PassRefPtr<MessagePort> port2)
+{
+ PlatformMessagePortChannel::createChannel(port1, port2);
+}
+
+PassOwnPtr<MessagePortChannel> MessagePortChannel::create(PassRefPtr<PlatformMessagePortChannel> channel)
+{
+ return new MessagePortChannel(channel);
+}
+
+MessagePortChannel::MessagePortChannel(PassRefPtr<PlatformMessagePortChannel> channel)
+ : m_channel(channel)
+{
+}
+
+MessagePortChannel::~MessagePortChannel()
+{
+ // Make sure we close our platform channel when the base is freed, to keep the channel objects from leaking.
+ m_channel->close();
+}
+
bool MessagePortChannel::entangleIfOpen(MessagePort* port)
{
return m_channel->entangleIfOpen(port);