From 87b216d2c3a9ef9b204758e747503a0fedbe74b1 Mon Sep 17 00:00:00 2001 From: Paul Adenot Date: Mon, 20 Oct 2014 18:18:24 +0200 Subject: [PATCH] Bug 1078354 - Part 2 - Don't try to measure a PeriodicWave size when an OscillatorNode is using a basic waveform. r=erahm --HG-- extra : rebase_source : 97028d8c6afd84dd71c8718305c074504d164da6 --- content/media/webaudio/OscillatorNode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/media/webaudio/OscillatorNode.cpp b/content/media/webaudio/OscillatorNode.cpp index 121d84a91ccd..4aae54d8361a 100644 --- a/content/media/webaudio/OscillatorNode.cpp +++ b/content/media/webaudio/OscillatorNode.cpp @@ -553,7 +553,9 @@ 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;