| Index: Source/modules/webaudio/AudioBufferSourceNode.cpp
|
| diff --git a/Source/modules/webaudio/AudioBufferSourceNode.cpp b/Source/modules/webaudio/AudioBufferSourceNode.cpp
|
| index 1c8dcbc75898ee9bbb4a432ca9b0a1a4b0c6e6e3..8c7fe46048c6656ebec99901640dc43352459755 100644
|
| --- a/Source/modules/webaudio/AudioBufferSourceNode.cpp
|
| +++ b/Source/modules/webaudio/AudioBufferSourceNode.cpp
|
| @@ -31,6 +31,7 @@
|
| #include "bindings/core/v8/ExceptionMessages.h"
|
| #include "bindings/core/v8/ExceptionState.h"
|
| #include "core/dom/ExceptionCode.h"
|
| +#include "core/frame/UseCounter.h"
|
| #include "platform/audio/AudioUtilities.h"
|
| #include "modules/webaudio/AudioContext.h"
|
| #include "modules/webaudio/AudioNodeOutput.h"
|
| @@ -341,6 +342,12 @@ void AudioBufferSourceNode::setBuffer(AudioBuffer* buffer, ExceptionState& excep
|
| {
|
| ASSERT(isMainThread());
|
|
|
| + if (m_buffer) {
|
| + // Setting the buffer more than once is deprecated. Change this to a DOM exception in M45
|
| + // or so.
|
| + UseCounter::countDeprecation(context()->executionContext(), UseCounter::AudioBufferSourceBufferOnce);
|
| + }
|
| +
|
| // The context must be locked since changing the buffer can re-configure the number of channels that are output.
|
| AudioContext::AutoLocker contextLocker(context());
|
|
|
|
|