| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Apple Inc. All rights reserved. | 3 * Copyright (C) 2013 Apple Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 23 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 24 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 30 */ |
| 31 | 31 |
| 32 #include "config.h" | 32 #include "config.h" |
| 33 #include "PlatformMessagePortChannel.h" | 33 #include "core/dom/default/PlatformMessagePortChannel.h" |
| 34 | 34 |
| 35 #include "MessagePort.h" | 35 #include "core/dom/MessagePort.h" |
| 36 #include "ScriptExecutionContext.h" | 36 #include "core/dom/ScriptExecutionContext.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 PassOwnPtr<PlatformMessagePortChannel::EventData> PlatformMessagePortChannel::Ev
entData::create(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePor
tChannelArray> channels) | 40 PassOwnPtr<PlatformMessagePortChannel::EventData> PlatformMessagePortChannel::Ev
entData::create(PassRefPtr<SerializedScriptValue> message, PassOwnPtr<MessagePor
tChannelArray> channels) |
| 41 { | 41 { |
| 42 return adoptPtr(new EventData(message, channels)); | 42 return adoptPtr(new EventData(message, channels)); |
| 43 } | 43 } |
| 44 | 44 |
| 45 PlatformMessagePortChannel::EventData::EventData(PassRefPtr<SerializedScriptValu
e> message, PassOwnPtr<MessagePortChannelArray> channels) | 45 PlatformMessagePortChannel::EventData::EventData(PassRefPtr<SerializedScriptValu
e> message, PassOwnPtr<MessagePortChannelArray> channels) |
| 46 : m_message(message) | 46 : m_message(message) |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 void PlatformMessagePortChannel::closeInternal() | 187 void PlatformMessagePortChannel::closeInternal() |
| 188 { | 188 { |
| 189 MutexLocker lock(m_mutex); | 189 MutexLocker lock(m_mutex); |
| 190 // Disentangle ourselves from the other end. We still maintain a reference t
o our incoming queue, since previously-existing messages should still be deliver
ed. | 190 // Disentangle ourselves from the other end. We still maintain a reference t
o our incoming queue, since previously-existing messages should still be deliver
ed. |
| 191 m_remotePort = 0; | 191 m_remotePort = 0; |
| 192 m_entangledChannel = 0; | 192 m_entangledChannel = 0; |
| 193 m_outgoingQueue = 0; | 193 m_outgoingQueue = 0; |
| 194 } | 194 } |
| 195 | 195 |
| 196 } // namespace WebCore | 196 } // namespace WebCore |
| OLD | NEW |