Bug 1221855 - null-check mInputBuffer in SizeOfExcludingThis(). r=padenot, a=lizzard
💩💩 backed out by 51f0f13e7985 💩 💩
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 06 Nov 2015 15:00:17 +1300
changeset 296706 9fbc92fa9e4b
parent 296705 8c199302644e
child 296707 decfff8497ce
push id5298
push usercbook@mozilla.com
push date2015-11-12 11:18 +0000
treeherdermozilla-beta@9fbc92fa9e4b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot, lizzard
bugs1221855
milestone43.0
Bug 1221855 - null-check mInputBuffer in SizeOfExcludingThis(). r=padenot, a=lizzard
dom/media/webaudio/ScriptProcessorNode.cpp
--- a/dom/media/webaudio/ScriptProcessorNode.cpp
+++ b/dom/media/webaudio/ScriptProcessorNode.cpp
@@ -335,17 +335,19 @@ public:
 
   virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     // Not owned:
     // - mSource (probably)
     // - mDestination (probably)
     size_t amount = AudioNodeEngine::SizeOfExcludingThis(aMallocSizeOf);
     amount += mSharedBuffers->SizeOfIncludingThis(aMallocSizeOf);
-    amount += mInputBuffer->SizeOfIncludingThis(aMallocSizeOf);
+    if (mInputBuffer) {
+      amount += mInputBuffer->SizeOfIncludingThis(aMallocSizeOf);
+    }
 
     return amount;
   }
 
   virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override
   {
     return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
   }