| Index: Source/modules/webaudio/WaveShaperNode.cpp
|
| diff --git a/Source/modules/webaudio/WaveShaperNode.cpp b/Source/modules/webaudio/WaveShaperNode.cpp
|
| index c4d4c9bb1d2f3763a94c77a8217ca54dbb718994..7e2064597ebda8ed3a8ea3b3a3f0228ca99127a4 100644
|
| --- a/Source/modules/webaudio/WaveShaperNode.cpp
|
| +++ b/Source/modules/webaudio/WaveShaperNode.cpp
|
| @@ -28,6 +28,7 @@
|
|
|
| #include "modules/webaudio/WaveShaperNode.h"
|
|
|
| +#include "bindings/v8/ExceptionMessages.h"
|
| #include "bindings/v8/ExceptionState.h"
|
| #include "core/dom/ExceptionCode.h"
|
| #include "wtf/MainThread.h"
|
| @@ -64,14 +65,20 @@ void WaveShaperNode::setOversample(const String& type, ExceptionState& es)
|
| // initialize() and uninitialize().
|
| AudioContext::AutoLocker contextLocker(context());
|
|
|
| - if (type == "none")
|
| + if (type == "none") {
|
| waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSampleNone);
|
| - else if (type == "2x")
|
| + } else if (type == "2x") {
|
| waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample2x);
|
| - else if (type == "4x")
|
| + } else if (type == "4x") {
|
| waveShaperProcessor()->setOversample(WaveShaperProcessor::OverSample4x);
|
| - else
|
| - es.throwUninformativeAndGenericDOMException(InvalidStateError);
|
| + } else {
|
| + es.throwDOMException(
|
| + InvalidStateError,
|
| + ExceptionMessages::failedToSet(
|
| + "oversample",
|
| + "WaveShaperNode",
|
| + "invalid oversample '" + type + "': must be 'none', '2x', or '4x'."));
|
| + }
|
| }
|
|
|
| String WaveShaperNode::oversample() const
|
|
|