bug 1457060 dereference MixerCallback and receiver on separate lines r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Thu, 26 Apr 2018 18:30:31 +1200
changeset 472041 63fca25d8f74d8d59b551b3d8e99826497f878f9
parent 472040 0ae9810db35257d6f3b1159fdbde04917871d231
child 472042 d78701ac0ea19f849ca73dac988484a8da9d3635
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1457060
milestone61.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 1457060 dereference MixerCallback and receiver on separate lines r=padenot MozReview-Commit-ID: JNltGvA6tMv
dom/media/AudioMixer.h
--- a/dom/media/AudioMixer.h
+++ b/dom/media/AudioMixer.h
@@ -58,21 +58,22 @@ public:
   }
 
   /* Get the data from the mixer. This is supposed to be called when all the
    * tracks have been mixed in. The caller should not hold onto the data. */
   void FinishMixing() {
     MOZ_ASSERT(mChannels && mFrames && mSampleRate, "Mix not called for this cycle?");
     for (MixerCallback* cb = mCallbacks.getFirst();
          cb != nullptr; cb = cb->getNext()) {
-      cb->mReceiver->MixerCallback(mMixedAudio.Elements(),
-                                   AudioSampleTypeToFormat<AudioDataValue>::Format,
-                                   mChannels,
-                                   mFrames,
-                                   mSampleRate);
+      MixerCallbackReceiver* receiver = cb->mReceiver;
+      receiver->MixerCallback(mMixedAudio.Elements(),
+                              AudioSampleTypeToFormat<AudioDataValue>::Format,
+                              mChannels,
+                              mFrames,
+                              mSampleRate);
     }
     PodZero(mMixedAudio.Elements(), mMixedAudio.Length());
     mSampleRate = mChannels = mFrames = 0;
   }
 
   /* Add a buffer to the mix. The buffer can be null if there's nothing to mix
    * but the callback is still needed. */
   void Mix(AudioDataValue* aSamples,