OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 | 227 |
228 RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, RTCConfiguration
* configuration, WebMediaConstraints constraints, ExceptionState& exceptionState
) | 228 RTCPeerConnection::RTCPeerConnection(ExecutionContext* context, RTCConfiguration
* configuration, WebMediaConstraints constraints, ExceptionState& exceptionState
) |
229 : ActiveDOMObject(context) | 229 : ActiveDOMObject(context) |
230 , m_signalingState(SignalingStateStable) | 230 , m_signalingState(SignalingStateStable) |
231 , m_iceGatheringState(ICEGatheringStateNew) | 231 , m_iceGatheringState(ICEGatheringStateNew) |
232 , m_iceConnectionState(ICEConnectionStateNew) | 232 , m_iceConnectionState(ICEConnectionStateNew) |
233 , m_dispatchScheduledEventRunner(this, &RTCPeerConnection::dispatchScheduled
Event) | 233 , m_dispatchScheduledEventRunner(this, &RTCPeerConnection::dispatchScheduled
Event) |
234 , m_stopped(false) | 234 , m_stopped(false) |
235 , m_closed(false) | 235 , m_closed(false) |
236 { | 236 { |
237 ScriptWrappable::init(this); | |
238 Document* document = toDocument(executionContext()); | 237 Document* document = toDocument(executionContext()); |
239 | 238 |
240 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the
assert in the destructor. | 239 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the
assert in the destructor. |
241 | 240 |
242 if (!document->frame()) { | 241 if (!document->frame()) { |
243 m_closed = true; | 242 m_closed = true; |
244 m_stopped = true; | 243 m_stopped = true; |
245 exceptionState.throwDOMException(NotSupportedError, "PeerConnections may
not be created in detached documents."); | 244 exceptionState.throwDOMException(NotSupportedError, "PeerConnections may
not be created in detached documents."); |
246 return; | 245 return; |
247 } | 246 } |
(...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
806 visitor->trace(m_localStreams); | 805 visitor->trace(m_localStreams); |
807 visitor->trace(m_remoteStreams); | 806 visitor->trace(m_remoteStreams); |
808 visitor->trace(m_dataChannels); | 807 visitor->trace(m_dataChannels); |
809 #if ENABLE(OILPAN) | 808 #if ENABLE(OILPAN) |
810 visitor->trace(m_scheduledEvents); | 809 visitor->trace(m_scheduledEvents); |
811 #endif | 810 #endif |
812 EventTargetWithInlineData::trace(visitor); | 811 EventTargetWithInlineData::trace(visitor); |
813 } | 812 } |
814 | 813 |
815 } // namespace blink | 814 } // namespace blink |
OLD | NEW |