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

Unified Diff: Source/modules/webaudio/AudioBuffer.cpp

Issue 606653006: bindings: Adds DOMArrayBuffer, etc. as thin wrappers for ArrayBuffer, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 2 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
« no previous file with comments | « Source/modules/webaudio/AudioBuffer.h ('k') | Source/modules/webaudio/AudioContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/webaudio/AudioBuffer.cpp
diff --git a/Source/modules/webaudio/AudioBuffer.cpp b/Source/modules/webaudio/AudioBuffer.cpp
index 38c7df46089e6cee93403f01cc4ad1a3dfb541c1..9aed043867da099285f602968881c39dc04fda9d 100644
--- a/Source/modules/webaudio/AudioBuffer.cpp
+++ b/Source/modules/webaudio/AudioBuffer.cpp
@@ -34,7 +34,7 @@
#include "bindings/core/v8/ExceptionMessages.h"
#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/custom/V8ArrayBufferCustom.h"
+#include "core/dom/DOMArrayBufferDeallocationObserver.h"
#include "core/dom/ExceptionCode.h"
#include "modules/webaudio/AudioContext.h"
#include "platform/audio/AudioBus.h"
@@ -174,7 +174,7 @@ AudioBuffer::AudioBuffer(AudioBus* bus)
}
}
-PassRefPtr<Float32Array> AudioBuffer::getChannelData(unsigned channelIndex, ExceptionState& exceptionState)
+PassRefPtr<DOMFloat32Array> AudioBuffer::getChannelData(unsigned channelIndex, ExceptionState& exceptionState)
{
if (channelIndex >= m_channels.size()) {
exceptionState.throwDOMException(IndexSizeError, "channel index (" + String::number(channelIndex) + ") exceeds number of channels (" + String::number(m_channels.size()) + ")");
@@ -182,7 +182,7 @@ PassRefPtr<Float32Array> AudioBuffer::getChannelData(unsigned channelIndex, Exce
}
Float32Array* channelData = m_channels[channelIndex].get();
- return Float32Array::create(channelData->buffer(), channelData->byteOffset(), channelData->length());
+ return DOMFloat32Array::create(channelData->buffer(), channelData->byteOffset(), channelData->length());
}
Float32Array* AudioBuffer::getChannelData(unsigned channelIndex)
@@ -212,7 +212,7 @@ v8::Handle<v8::Object> AudioBuffer::associateWithWrapper(const WrapperTypeInfo*
// GC, and until the object is exposed to JavaScript, V8 GC doesn't
// affect it.
for (unsigned i = 0, n = numberOfChannels(); i < n; ++i) {
- getChannelData(i)->buffer()->setDeallocationObserver(V8ArrayBufferDeallocationObserver::instanceTemplate());
+ getChannelData(i)->buffer()->setDeallocationObserver(DOMArrayBufferDeallocationObserver::instance());
}
}
return wrapper;
« no previous file with comments | « Source/modules/webaudio/AudioBuffer.h ('k') | Source/modules/webaudio/AudioContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698