| Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| index 7163faa7fab29b637b137ec6ec815512d49b438e..4a24c286721e4ed3802f033fc81cacd90bc37285 100644
|
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
|
| @@ -1331,7 +1331,16 @@ void RTCPeerConnection::didAddRemoteDataChannel(
|
| }
|
|
|
| void RTCPeerConnection::releasePeerConnectionHandler() {
|
| - contextDestroyed();
|
| + if (m_stopped)
|
| + return;
|
| +
|
| + m_stopped = true;
|
| + m_iceConnectionState = ICEConnectionStateClosed;
|
| + m_signalingState = SignalingStateClosed;
|
| +
|
| + m_dispatchScheduledEventRunner->stop();
|
| +
|
| + m_peerHandler.reset();
|
| }
|
|
|
| void RTCPeerConnection::closePeerConnection() {
|
| @@ -1355,17 +1364,8 @@ void RTCPeerConnection::resume() {
|
| m_dispatchScheduledEventRunner->resume();
|
| }
|
|
|
| -void RTCPeerConnection::contextDestroyed() {
|
| - if (m_stopped)
|
| - return;
|
| -
|
| - m_stopped = true;
|
| - m_iceConnectionState = ICEConnectionStateClosed;
|
| - m_signalingState = SignalingStateClosed;
|
| -
|
| - m_dispatchScheduledEventRunner->stop();
|
| -
|
| - m_peerHandler.reset();
|
| +void RTCPeerConnection::contextDestroyed(ExecutionContext*) {
|
| + releasePeerConnectionHandler();
|
| }
|
|
|
| void RTCPeerConnection::changeSignalingState(SignalingState signalingState) {
|
|
|