Bug 1221855 - null-check mInputBuffer in SizeOfExcludingThis(). r=padenot, a=lizzard
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 06 Nov 2015 15:00:17 +1300
changeset 298435 294b55e22276620d3fa9568545cfcfec8e69752b
parent 298434 93d92b8c2b6ca650b173b258cef73a458c81716c
child 298436 844ff2b4f2676b450346b624cacbadfcdc16b3b9
push id962
push userjlund@mozilla.com
push dateFri, 04 Dec 2015 23:28:54 +0000
treeherdermozilla-release@23a2d286e80f [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);
   }