| Index: Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp b/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp
|
| index 7216a8ec56bf1902f009acc05391f8719b37a6cf..f6db41308d4f4d65a6563f5fba4ee5d69b0354e7 100644
|
| --- a/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8OscillatorNodeCustom.cpp
|
| @@ -26,6 +26,7 @@
|
| #if ENABLE(WEB_AUDIO)
|
| #include "V8OscillatorNode.h"
|
|
|
| +#include "bindings/v8/ExceptionState.h"
|
| #include "bindings/v8/V8Binding.h"
|
| #include "modules/webaudio/OscillatorNode.h"
|
|
|
| @@ -33,14 +34,18 @@ namespace WebCore {
|
|
|
| void V8OscillatorNode::typeAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
|
| {
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "type", "OscillatorNode", info.Holder(), info.GetIsolate());
|
| v8::Handle<v8::Object> holder = info.Holder();
|
| OscillatorNode* imp = V8OscillatorNode::toNative(holder);
|
|
|
| if (value->IsNumber()) {
|
| - bool ok = false;
|
| - uint32_t type = toUInt32(value, ok);
|
| - if (!ok || !imp->setType(type))
|
| - throwTypeError("Illegal OscillatorNode type", info.GetIsolate());
|
| + uint32_t type = toUInt32(value, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + if (!imp->setType(type)) {
|
| + exceptionState.throwTypeError("Illegal OscillatorNode type");
|
| + exceptionState.throwIfNeeded();
|
| + }
|
| return;
|
| }
|
|
|
| @@ -52,7 +57,8 @@ void V8OscillatorNode::typeAttributeSetterCustom(v8::Local<v8::Value> value, con
|
| }
|
| }
|
|
|
| - throwTypeError("Illegal OscillatorNode type", info.GetIsolate());
|
| + exceptionState.throwTypeError("Illegal OscillatorNode type");
|
| + exceptionState.throwIfNeeded();
|
| }
|
|
|
| } // namespace WebCore
|
|
|