Index: third_party/WebKit/Source/core/events/MessageEvent.h |
diff --git a/third_party/WebKit/Source/core/events/MessageEvent.h b/third_party/WebKit/Source/core/events/MessageEvent.h |
index de9700cad4736d7469e5329e054ad8e88cbec5e2..68ce6c66818f68f70457603b32b5bcdc189e399d 100644 |
--- a/third_party/WebKit/Source/core/events/MessageEvent.h |
+++ b/third_party/WebKit/Source/core/events/MessageEvent.h |
@@ -63,7 +63,7 @@ class CORE_EXPORT MessageEvent final : public Event { |
return new MessageEvent(std::move(data), origin, lastEventId, source, ports, |
suborigin); |
} |
- static MessageEvent* create(std::unique_ptr<MessagePortChannelArray> channels, |
+ static MessageEvent* create(MessagePortChannelArray channels, |
PassRefPtr<SerializedScriptValue> data, |
const String& origin = String(), |
const String& lastEventId = String(), |
@@ -115,9 +115,8 @@ class CORE_EXPORT MessageEvent final : public Event { |
EventTarget* source() const { return m_source.get(); } |
MessagePortArray ports(bool& isNull) const; |
MessagePortArray ports() const; |
- MessagePortChannelArray* channels() const { |
- return m_channels ? m_channels.get() : nullptr; |
- } |
+ |
+ MessagePortChannelArray releaseChannels() { return std::move(m_channels); } |
const AtomicString& interfaceName() const override; |
@@ -182,7 +181,7 @@ class CORE_EXPORT MessageEvent final : public Event { |
const String& origin, |
const String& lastEventId, |
EventTarget* source, |
- std::unique_ptr<MessagePortChannelArray>, |
+ MessagePortChannelArray, |
const String& suborigin); |
MessageEvent(const String& data, |
@@ -202,11 +201,11 @@ class CORE_EXPORT MessageEvent final : public Event { |
String m_origin; |
String m_lastEventId; |
Member<EventTarget> m_source; |
- // m_ports are the MessagePorts in an engtangled state, and m_channels are |
+ // m_ports are the MessagePorts in an entangled state, and m_channels are |
// the MessageChannels in a disentangled state. Only one of them can be |
// non-empty at a time. entangleMessagePorts() moves between the states. |
Member<MessagePortArray> m_ports; |
- std::unique_ptr<MessagePortChannelArray> m_channels; |
+ MessagePortChannelArray m_channels; |
String m_suborigin; |
}; |