Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(531)

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698