Bug 1078354 - Part 2: Don't try to measure a PeriodicWave size when an OscillatorNode is using a basic waveform. r=erahm, a=lmandel
authorPaul Adenot <paul@paul.cx>
Mon, 20 Oct 2014 18:18:24 +0200
changeset 225801 b185e7a13e18
parent 225800 9d0a16097623
child 225802 d080a93fd9e1
push id4021
push userryanvm@gmail.com
push date2014-10-24 13:05 +0000
treeherdermozilla-beta@b185e7a13e18 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm, lmandel
bugs1078354
milestone34.0
Bug 1078354 - Part 2: Don't try to measure a PeriodicWave size when an OscillatorNode is using a basic waveform. r=erahm, a=lmandel
content/media/webaudio/OscillatorNode.cpp
--- a/content/media/webaudio/OscillatorNode.cpp
+++ b/content/media/webaudio/OscillatorNode.cpp
@@ -548,17 +548,19 @@ OscillatorNode::~OscillatorNode()
 }
 
 size_t
 OscillatorNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
 {
   size_t amount = AudioNode::SizeOfExcludingThis(aMallocSizeOf);
 
   // For now only report if we know for sure that it's not shared.
-  amount += mPeriodicWave->SizeOfIncludingThisIfNotShared(aMallocSizeOf);
+  if (mPeriodicWave) {
+    amount += mPeriodicWave->SizeOfIncludingThisIfNotShared(aMallocSizeOf);
+  }
   amount += mFrequency->SizeOfIncludingThis(aMallocSizeOf);
   amount += mDetune->SizeOfIncludingThis(aMallocSizeOf);
   return amount;
 }
 
 size_t
 OscillatorNode::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
 {