Bug 1275648: check return value of GetPipelineByTrackId_m. r=jesup
authorNils Ohlmeier [:drno] <drno@ohlmeier.org>
Wed, 25 May 2016 10:32:29 -0700
changeset 340391 87d45d38ab4ae69ce67788899982c7776725cccb
parent 340390 add719ee5b2f0f3475f2aa5f7c4cbdb861b186f7
child 340392 00fdf59663db3f4391d5d0aeecf90469ba56d1ed
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1275648
milestone49.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 1275648: check return value of GetPipelineByTrackId_m. r=jesup MozReview-Commit-ID: EtJSbok04Lc
media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp
--- a/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp
+++ b/media/webrtc/signaling/src/peerconnection/PeerConnectionMedia.cpp
@@ -1455,19 +1455,21 @@ void RemoteSourceStreamInfo::UpdatePrinc
   // accessible to the script principal.
   for (auto& trackPair : mTracks) {
     MOZ_RELEASE_ASSERT(trackPair.second);
     RemoteTrackSource& source =
       static_cast<RemoteTrackSource&>(trackPair.second->GetSource());
     source.SetPrincipal(aPrincipal);
 
     RefPtr<MediaPipeline> pipeline = GetPipelineByTrackId_m(trackPair.first);
-    MOZ_ASSERT(pipeline->direction() == MediaPipeline::RECEIVE);
-    static_cast<MediaPipelineReceive*>(pipeline.get())
-      ->SetPrincipalHandle_m(MakePrincipalHandle(aPrincipal));
+    if (pipeline) {
+      MOZ_ASSERT(pipeline->direction() == MediaPipeline::RECEIVE);
+      static_cast<MediaPipelineReceive*>(pipeline.get())
+        ->SetPrincipalHandle_m(MakePrincipalHandle(aPrincipal));
+    }
   }
 }
 #endif // MOZILLA_INTERNAL_API
 
 bool
 PeerConnectionMedia::AnyCodecHasPluginID(uint64_t aPluginID)
 {
   for (uint32_t i=0; i < mLocalSourceStreams.Length(); ++i) {