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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioBuffer.h

Issue 1878463002: Move DOMArrayBuffer, DOMArrayBufferViews and DataView to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tidy Created 4 years, 8 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/AudioBuffer.h
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
index 06f0519cc8fa715cc772b2f5d01e17cc6da0f9ba..ec8ebfec369b2810b906c095e0348c53ef109a01 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
@@ -60,7 +60,7 @@ public:
// Channel data access
unsigned numberOfChannels() const { return m_channels.size(); }
- PassRefPtr<DOMFloat32Array> getChannelData(unsigned channelIndex, ExceptionState&);
+ DOMFloat32Array* getChannelData(unsigned channelIndex, ExceptionState&);
DOMFloat32Array* getChannelData(unsigned channelIndex);
void copyFromChannel(DOMFloat32Array*, long channelNumber, ExceptionState&);
void copyFromChannel(DOMFloat32Array*, long channelNumber, unsigned long startInChannel, ExceptionState&);
@@ -69,10 +69,13 @@ public:
void zero();
- DEFINE_INLINE_TRACE() { }
+ DEFINE_INLINE_TRACE()
+ {
+ visitor->trace(m_channels);
+ }
private:
- static PassRefPtr<DOMFloat32Array> createFloat32ArrayOrNull(size_t length);
+ static DOMFloat32Array* createFloat32ArrayOrNull(size_t length);
protected:
AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate);
@@ -82,7 +85,7 @@ protected:
float m_sampleRate;
size_t m_length;
- Vector<RefPtr<DOMFloat32Array>> m_channels;
+ HeapVector<Member<DOMFloat32Array>> m_channels;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698