Bug 1182808 - Part 2: Remove AlignedFallibleTArray. r=padenot
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Wed, 15 Jul 2015 12:58:18 -0700
changeset 253099 6adef19499671e44b0feaa79434f9b407a75cd16
parent 253098 31e0ecbf97812fb9f9b5a16dab9680c45809cb0c
child 253100 ba76c8f3b3737ec19204f52bd7820f885bee803e
push id29061
push userryanvm@gmail.com
push dateThu, 16 Jul 2015 18:53:45 +0000
treeherdermozilla-central@a0f4a688433d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1182808
milestone42.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 1182808 - Part 2: Remove AlignedFallibleTArray. r=padenot
dom/media/webaudio/AlignedTArray.h
dom/media/webaudio/AnalyserNode.cpp
dom/media/webaudio/AnalyserNode.h
--- a/dom/media/webaudio/AlignedTArray.h
+++ b/dom/media/webaudio/AlignedTArray.h
@@ -70,24 +70,9 @@ public:
 
   AlignedTArray() {}
   explicit AlignedTArray(size_type capacity) : base_type(capacity) {}
 private:
   AlignedTArray(const AlignedTArray& other) = delete;
   void operator=(const AlignedTArray& other) = delete;
 };
 
-template <typename E, int N=32>
-class AlignedFallibleTArray : public AlignedTArray_Impl<E, N, nsTArrayFallibleAllocator>
-{
-public:
-  typedef AlignedTArray_Impl<E, N, nsTArrayFallibleAllocator> base_type;
-  typedef AlignedFallibleTArray<E, N>                         self_type;
-  typedef typename base_type::size_type                       size_type;
-
-  AlignedFallibleTArray() {}
-  explicit AlignedFallibleTArray(size_type capacity) : base_type(capacity) {}
-private:
-  AlignedFallibleTArray(const AlignedFallibleTArray& other) = delete;
-  void operator=(const AlignedFallibleTArray& other) = delete;
-};
-
 #endif // AlignedTArray_h__
--- a/dom/media/webaudio/AnalyserNode.cpp
+++ b/dom/media/webaudio/AnalyserNode.cpp
@@ -246,17 +246,17 @@ AnalyserNode::GetByteTimeDomainData(cons
     buffer[i] = static_cast<unsigned char>(scaled);
   }
 }
 
 bool
 AnalyserNode::FFTAnalysis()
 {
   float* inputBuffer;
-  AlignedFallibleTArray<float> tmpBuffer;
+  AlignedTArray<float> tmpBuffer;
   if (mWriteIndex == 0) {
     inputBuffer = mBuffer.Elements();
   } else {
     if (!tmpBuffer.SetLength(FftSize(), fallible)) {
       return false;
     }
     inputBuffer = tmpBuffer.Elements();
     memcpy(inputBuffer, mBuffer.Elements() + mWriteIndex, sizeof(float) * (FftSize() - mWriteIndex));
--- a/dom/media/webaudio/AnalyserNode.h
+++ b/dom/media/webaudio/AnalyserNode.h
@@ -73,17 +73,17 @@ private:
   void ApplyBlackmanWindow(float* aBuffer, uint32_t aSize);
 
 private:
   FFTBlock mAnalysisBlock;
   double mMinDecibels;
   double mMaxDecibels;
   double mSmoothingTimeConstant;
   uint32_t mWriteIndex;
-  AlignedFallibleTArray<float> mBuffer;
-  AlignedFallibleTArray<float> mOutputBuffer;
+  AlignedTArray<float> mBuffer;
+  AlignedTArray<float> mOutputBuffer;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif