Bug 1317221 - Used vector delete where required in TestAudioSegment.cpp. r=padenot.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 14 Nov 2016 17:20:05 +1100
changeset 322473 5af892c2f0a1f78fe5cb02c90b61f6fb094b832f
parent 322472 8a79f4aaa4be112e6e0fad32d469609ccfd17517
child 322474 e725cf00b32e304c50e4df8614cf01dfb49c095d
push id83886
push usernnethercote@mozilla.com
push dateTue, 15 Nov 2016 02:13:31 +0000
treeherdermozilla-inbound@5af892c2f0a1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1317221
milestone52.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 1317221 - Used vector delete where required in TestAudioSegment.cpp. r=padenot.
dom/media/gtest/TestAudioSegment.cpp
--- a/dom/media/gtest/TestAudioSegment.cpp
+++ b/dom/media/gtest/TestAudioSegment.cpp
@@ -197,17 +197,17 @@ void TestUpmixStereo()
 
   AudioChannelsUpMix(&channelsptr, 2, SilentChannel<T>());
 
   for (size_t channel = 0; channel < 2; channel++) {
     for (size_t i = 0; i < arraySize; i++) {
       ASSERT_TRUE(channelsptr[channel][i] == GetHighValue<T>());
     }
   }
-  delete channels[0];
+  delete [] channels[0];
 }
 
 template<typename T>
 void TestDownmixStereo()
 {
   const size_t arraySize = 1024;
   nsTArray<const T*> inputptr;
   nsTArray<T*> input;
@@ -229,18 +229,18 @@ void TestDownmixStereo()
 
   AudioChannelsDownMix(inputptr, output, 1, arraySize);
 
   for (size_t i = 0; i < arraySize; i++) {
     ASSERT_TRUE(output[0][i] == GetSilentValue<T>());
     ASSERT_TRUE(output[0][i] == GetSilentValue<T>());
   }
 
-  delete output[0];
-  delete output;
+  delete [] output[0];
+  delete [] output;
 }
 
 TEST(AudioSegment, Test)
 {
   TestInterleaveAndConvert<float, float>();
   TestInterleaveAndConvert<float, int16_t>();
   TestInterleaveAndConvert<int16_t, float>();
   TestInterleaveAndConvert<int16_t, int16_t>();