| Index: Source/bindings/v8/custom/V8PannerNodeCustom.cpp
|
| diff --git a/Source/bindings/v8/custom/V8PannerNodeCustom.cpp b/Source/bindings/v8/custom/V8PannerNodeCustom.cpp
|
| index 5e10fda34cf61e9ae56cf9914a1021f9eeea4310..e6a14afac5308f9beaaaa5e562f8a20a3a64dfbc 100644
|
| --- a/Source/bindings/v8/custom/V8PannerNodeCustom.cpp
|
| +++ b/Source/bindings/v8/custom/V8PannerNodeCustom.cpp
|
| @@ -26,6 +26,7 @@
|
| #if ENABLE(WEB_AUDIO)
|
| #include "V8PannerNode.h"
|
|
|
| +#include "bindings/v8/ExceptionState.h"
|
| #include "bindings/v8/V8Binding.h"
|
| #include "modules/webaudio/PannerNode.h"
|
|
|
| @@ -33,14 +34,17 @@ namespace WebCore {
|
|
|
| void V8PannerNode::panningModelAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
|
| {
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "panningModel", "PannerNode", info.Holder(), info.GetIsolate());
|
| PannerNode* imp = V8PannerNode::toNative(info.Holder());
|
|
|
| if (value->IsNumber()) {
|
| - bool ok = false;
|
| - uint32_t model = toUInt32(value, ok);
|
| - ASSERT(ok);
|
| - if (!imp->setPanningModel(model))
|
| - throwTypeError("Illegal panningModel", info.GetIsolate());
|
| + uint32_t model = toUInt32(value, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + if (!imp->setPanningModel(model)) {
|
| + exceptionState.throwTypeError("Illegal panningModel");
|
| + exceptionState.throwIfNeeded();
|
| + }
|
| return;
|
| }
|
|
|
| @@ -52,19 +56,23 @@ void V8PannerNode::panningModelAttributeSetterCustom(v8::Local<v8::Value> value,
|
| }
|
| }
|
|
|
| - throwTypeError("Illegal panningModel", info.GetIsolate());
|
| + exceptionState.throwTypeError("Illegal panningModel");
|
| + exceptionState.throwIfNeeded();
|
| }
|
|
|
| void V8PannerNode::distanceModelAttributeSetterCustom(v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
|
| {
|
| + ExceptionState exceptionState(ExceptionState::SetterContext, "distanceModel", "PannerNode", info.Holder(), info.GetIsolate());
|
| PannerNode* imp = V8PannerNode::toNative(info.Holder());
|
|
|
| if (value->IsNumber()) {
|
| - bool ok = false;
|
| - uint32_t model = toUInt32(value, ok);
|
| - ASSERT(ok);
|
| - if (!imp->setDistanceModel(model))
|
| - throwTypeError("Illegal distanceModel", info.GetIsolate());
|
| + uint32_t model = toUInt32(value, exceptionState);
|
| + if (exceptionState.throwIfNeeded())
|
| + return;
|
| + if (!imp->setDistanceModel(model)) {
|
| + exceptionState.throwTypeError("Illegal distanceModel");
|
| + exceptionState.throwIfNeeded();
|
| + }
|
| return;
|
| }
|
|
|
| @@ -76,7 +84,8 @@ void V8PannerNode::distanceModelAttributeSetterCustom(v8::Local<v8::Value> value
|
| }
|
| }
|
|
|
| - throwTypeError("Illegal distanceModel", info.GetIsolate());
|
| + exceptionState.throwTypeError("Illegal distanceModel");
|
| + exceptionState.throwIfNeeded();
|
| }
|
|
|
| } // namespace WebCore
|
|
|