Chromium Code Reviews| Index: Source/modules/webaudio/AudioBuffer.h |
| diff --git a/Source/modules/webaudio/AudioBuffer.h b/Source/modules/webaudio/AudioBuffer.h |
| index a7627bed7c57625d07a046809c4665ad74a56381..bb2bd7ea1b63c05dc79bbcb078343ef96532baca 100644 |
| --- a/Source/modules/webaudio/AudioBuffer.h |
| +++ b/Source/modules/webaudio/AudioBuffer.h |
| @@ -41,12 +41,14 @@ namespace WebCore { |
| class AudioBus; |
| class ExceptionState; |
| -class AudioBuffer : public ScriptWrappable, public RefCounted<AudioBuffer> { |
| +class AudioBuffer : public RefCountedWillBeGarbageCollectedFinalized<AudioBuffer>, public ScriptWrappable { |
| public: |
| - static PassRefPtr<AudioBuffer> create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
| + static PassRefPtrWillBeRawPtr<AudioBuffer> create(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
| // Returns 0 if data is not a valid audio file. |
| - static PassRefPtr<AudioBuffer> createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate); |
| + static PassRefPtrWillBeRawPtr<AudioBuffer> createFromAudioFileData(const void* data, size_t dataSize, bool mixToMono, float sampleRate); |
| + |
| + static PassRefPtrWillBeRawPtr<AudioBuffer> createFromAudioBus(AudioBus*); |
| // Format |
| size_t length() const { return m_length; } |
| @@ -61,6 +63,9 @@ public: |
| static float minAllowedSampleRate(); |
| static float maxAllowedSampleRate(); |
| + |
| + void trace(Visitor*) { } |
|
Ken Russell (switch to Gerrit)
2014/05/07 22:07:20
Just confirming -- it isn't necessary to do anythi
haraken
2014/05/08 00:52:09
m_channels is not on heap, so we don't need to tra
|
| + |
| protected: |
| AudioBuffer(unsigned numberOfChannels, size_t numberOfFrames, float sampleRate); |
| explicit AudioBuffer(AudioBus*); |