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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
492 m_signalingState(SignalingStateStable), | 492 m_signalingState(SignalingStateStable), |
493 m_iceGatheringState(ICEGatheringStateNew), | 493 m_iceGatheringState(ICEGatheringStateNew), |
494 m_iceConnectionState(ICEConnectionStateNew), | 494 m_iceConnectionState(ICEConnectionStateNew), |
495 m_dispatchScheduledEventRunner( | 495 m_dispatchScheduledEventRunner( |
496 AsyncMethodRunner<RTCPeerConnection>::create( | 496 AsyncMethodRunner<RTCPeerConnection>::create( |
497 this, | 497 this, |
498 &RTCPeerConnection::dispatchScheduledEvent)), | 498 &RTCPeerConnection::dispatchScheduledEvent)), |
499 m_stopped(false), | 499 m_stopped(false), |
500 m_closed(false), | 500 m_closed(false), |
501 m_hasDataChannels(false) { | 501 m_hasDataChannels(false) { |
502 ThreadState::current()->registerPreFinalizer(this); | |
503 Document* document = toDocument(getExecutionContext()); | 502 Document* document = toDocument(getExecutionContext()); |
504 | 503 |
505 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the | 504 // If we fail, set |m_closed| and |m_stopped| to true, to avoid hitting the |
506 // assert in the destructor. | 505 // assert in the destructor. |
507 | 506 |
508 if (!document->frame()) { | 507 if (!document->frame()) { |
509 m_closed = true; | 508 m_closed = true; |
510 m_stopped = true; | 509 m_stopped = true; |
511 exceptionState.throwDOMException( | 510 exceptionState.throwDOMException( |
512 NotSupportedError, | 511 NotSupportedError, |
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1491 DEFINE_TRACE(RTCPeerConnection) { | 1490 DEFINE_TRACE(RTCPeerConnection) { |
1492 visitor->trace(m_localStreams); | 1491 visitor->trace(m_localStreams); |
1493 visitor->trace(m_remoteStreams); | 1492 visitor->trace(m_remoteStreams); |
1494 visitor->trace(m_dispatchScheduledEventRunner); | 1493 visitor->trace(m_dispatchScheduledEventRunner); |
1495 visitor->trace(m_scheduledEvents); | 1494 visitor->trace(m_scheduledEvents); |
1496 EventTargetWithInlineData::trace(visitor); | 1495 EventTargetWithInlineData::trace(visitor); |
1497 SuspendableObject::trace(visitor); | 1496 SuspendableObject::trace(visitor); |
1498 } | 1497 } |
1499 | 1498 |
1500 } // namespace blink | 1499 } // namespace blink |
OLD | NEW |