Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Unified Diff: third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
index 212e4d0d76161367d607f0dd77522c709510e32c..3acf089c871737b178d4e03826c96ac143e2fe4b 100644
--- a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
@@ -27,6 +27,7 @@
#include "platform/audio/AudioUtilities.h"
#include "platform/audio/VectorMath.h"
#include "wtf/MathExtras.h"
+#include "wtf/PtrUtil.h"
#include <algorithm>
#include <complex>
#include <limits.h>
@@ -54,7 +55,7 @@ RealtimeAnalyser::RealtimeAnalyser()
, m_maxDecibels(DefaultMaxDecibels)
, m_lastAnalysisTime(-1)
{
- m_analysisFrame = adoptPtr(new FFTFrame(DefaultFFTSize));
+ m_analysisFrame = wrapUnique(new FFTFrame(DefaultFFTSize));
}
bool RealtimeAnalyser::setFftSize(size_t size)
@@ -69,7 +70,7 @@ bool RealtimeAnalyser::setFftSize(size_t size)
return false;
if (m_fftSize != size) {
- m_analysisFrame = adoptPtr(new FFTFrame(size));
+ m_analysisFrame = wrapUnique(new FFTFrame(size));
// m_magnitudeBuffer has size = fftSize / 2 because it contains floats reduced from complex values in m_analysisFrame.
m_magnitudeBuffer.allocate(size / 2);
m_fftSize = size;

Powered by Google App Engine
This is Rietveld 408576698