Bug 1547278 - Part 1: Ensure that transports are created for a repeated sLD(offer). r=mjf
authorByron Campen [:bwc] <docfaraday@gmail.com>
Wed, 01 May 2019 15:46:05 +0000
changeset 531096 6df281b9388839efca4fc89ae62aa2c696aaf76b
parent 531095 7b505a8a1ad94c2e83dcbb7b505c4a16d6b21fff
child 531119 bdf36faf780ba706bbebc8cbcd32ba892a899440
child 531120 27babfbd8283432084e2598656b60e3602286314
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmjf
bugs1547278
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1547278 - Part 1: Ensure that transports are created for a repeated sLD(offer). r=mjf Differential Revision: https://phabricator.services.mozilla.com/D29405
media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
@@ -2247,28 +2247,31 @@ void PeerConnectionImpl::ShutdownMedia()
   // Forget the reference so that we can transfer it to
   // SelfDestruct().
   mMedia.forget().take()->SelfDestruct();
 }
 
 void PeerConnectionImpl::SetSignalingState_m(
     PCImplSignalingState aSignalingState, bool rollback) {
   PC_AUTO_ENTER_API_CALL_NO_CHECK();
-  if (mSignalingState == aSignalingState ||
-      mSignalingState == PCImplSignalingState::SignalingClosed) {
+  if (mSignalingState == PCImplSignalingState::SignalingClosed) {
     return;
   }
 
   if (aSignalingState == PCImplSignalingState::SignalingHaveLocalOffer ||
       (aSignalingState == PCImplSignalingState::SignalingStable &&
        mSignalingState == PCImplSignalingState::SignalingHaveRemoteOffer &&
        !rollback)) {
     mMedia->EnsureTransports(*mJsepSession);
   }
 
+  if (mSignalingState == aSignalingState) {
+    return;
+  }
+
   mSignalingState = aSignalingState;
 
   if (mSignalingState == PCImplSignalingState::SignalingStable) {
     // If we're rolling back a local offer, we might need to remove some
     // transports, and stomp some MediaPipeline setup, but nothing further
     // needs to be done.
     mMedia->UpdateTransports(*mJsepSession, mForceIceTcp);
     if (NS_FAILED(mMedia->UpdateMediaPipelines())) {