Bug 864255: Crash in production builds if we can't shut down properly r=jesup
authorAdam Roach [:abr] <adam@nostrum.com>
Tue, 07 May 2013 21:13:42 -0500
changeset 142154 42e458069da3d884542e5d67eca1133852335683
parent 142153 6d5ff743bb6bfe3db8b0de28af080122256f6ac6
child 142155 229cd16b078aae64e3a36093828f956bbf953182
push id2579
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 18:52:47 +0000
treeherdermozilla-beta@b69b7de8a05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs864255
milestone23.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 864255: Crash in production builds if we can't shut down properly r=jesup
media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -335,16 +335,19 @@ class MediaPipelineTransmit : public Med
         buffer_current_(0), samplenum_10ms_(0){}
 
     ~PipelineListener()
     {
       // release conduit on mainthread.  Must use forget()!
       nsresult rv = NS_DispatchToMainThread(new
         ConduitDeleteEvent(conduit_.forget()), NS_DISPATCH_NORMAL);
       MOZ_ASSERT(!NS_FAILED(rv),"Could not dispatch conduit shutdown to main");
+      if (NS_FAILED(rv)) {
+        MOZ_CRASH();
+      }
     }
 
 
     // XXX. This is not thread-safe but the hazard is just
     // that active_ = true takes a while to propagate. Revisit
     // when 823600 lands.
     void SetActive(bool active) { active_ = active; }
 
@@ -447,16 +450,19 @@ class MediaPipelineReceiveAudio : public
                      const RefPtr<MediaSessionConduit>& conduit);
 
     ~PipelineListener()
     {
       // release conduit on mainthread.  Must use forget()!
       nsresult rv = NS_DispatchToMainThread(new
         ConduitDeleteEvent(conduit_.forget()), NS_DISPATCH_NORMAL);
       MOZ_ASSERT(!NS_FAILED(rv),"Could not dispatch conduit shutdown to main");
+      if (NS_FAILED(rv)) {
+        MOZ_CRASH();
+      }
     }
 
     // Implement MediaStreamListener
     virtual void NotifyQueuedTrackChanges(MediaStreamGraph* graph, TrackID tid,
                                           TrackRate rate,
                                           TrackTicks offset,
                                           uint32_t events,
                                           const MediaSegment& queued_media) MOZ_OVERRIDE {}