bug 1394341 replace xmalloc with operator new(size_t) to match AudioBlock deallocation in delete r=padenot
authorKarl Tomlinson <karlt+@karlt.net>
Wed, 30 Aug 2017 12:17:07 +1200
changeset 428561 57865ef80d4fd8a2fb07465d99691f2a27c39bd8
parent 428560 af0542b1cd926434206071a03b1fc8553737ff13
child 428562 73af09f7cb84c174f6608a545956d424866cfdc4
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1394341
milestone57.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 1394341 replace xmalloc with operator new(size_t) to match AudioBlock deallocation in delete r=padenot MozReview-Commit-ID: EqDe41PBf3C
dom/media/webaudio/AudioBlock.cpp
--- a/dom/media/webaudio/AudioBlock.cpp
+++ b/dom/media/webaudio/AudioBlock.cpp
@@ -38,17 +38,17 @@ public:
     size *= aChannelCount;
     size *= sizeof(float);
     size += sizeof(AudioBlockBuffer);
     size += 15;  //padding for alignment
     if (!size.isValid()) {
       MOZ_CRASH();
     }
 
-    void* m = moz_xmalloc(size.value());
+    void* m = operator new(size.value());
     RefPtr<AudioBlockBuffer> p = new (m) AudioBlockBuffer();
     NS_ASSERTION((reinterpret_cast<char*>(p.get() + 1) - reinterpret_cast<char*>(p.get())) % 4 == 0,
                  "AudioBlockBuffers should be at least 4-byte aligned");
     return p.forget();
   }
 
   // Graph thread only.
   void DownstreamRefAdded() { ++mDownstreamRefCount; }