OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "modules/serviceworkers/ExtendableMessageEvent.h" | 5 #include "modules/serviceworkers/ExtendableMessageEvent.h" |
6 | 6 |
7 namespace blink { | 7 namespace blink { |
8 | 8 |
9 ExtendableMessageEvent* ExtendableMessageEvent::create( | 9 ExtendableMessageEvent* ExtendableMessageEvent::create( |
10 const AtomicString& type, | 10 const AtomicString& type, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 } | 122 } |
123 | 123 |
124 ExtendableMessageEvent::ExtendableMessageEvent( | 124 ExtendableMessageEvent::ExtendableMessageEvent( |
125 PassRefPtr<SerializedScriptValue> data, | 125 PassRefPtr<SerializedScriptValue> data, |
126 const String& origin, | 126 const String& origin, |
127 MessagePortArray* ports, | 127 MessagePortArray* ports, |
128 WaitUntilObserver* observer) | 128 WaitUntilObserver* observer) |
129 : ExtendableEvent(EventTypeNames::message, | 129 : ExtendableEvent(EventTypeNames::message, |
130 ExtendableMessageEventInit(), | 130 ExtendableMessageEventInit(), |
131 observer), | 131 observer), |
132 m_serializedData(data), | 132 m_serializedData(std::move(data)), |
133 m_origin(origin), | 133 m_origin(origin), |
134 m_lastEventId(String()), | 134 m_lastEventId(String()), |
135 m_ports(ports) { | 135 m_ports(ports) { |
136 if (m_serializedData) | 136 if (m_serializedData) |
137 m_serializedData->registerMemoryAllocatedWithCurrentScriptContext(); | 137 m_serializedData->registerMemoryAllocatedWithCurrentScriptContext(); |
138 } | 138 } |
139 | 139 |
140 } // namespace blink | 140 } // namespace blink |
OLD | NEW |