Chromium Code Reviews| Index: third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
| index e1eb9bebba9a0c8efc9e94fb9d0eb479c77357cc..cbe169bcf78111f6d4ad9a8f536a0e68381a7a0e 100644 |
| --- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp |
| @@ -467,10 +467,18 @@ AudioParam* AudioParam::setTargetAtTime(float target, |
| return this; |
| } |
| -AudioParam* AudioParam::setValueCurveAtTime(DOMFloat32Array* curve, |
| - double time, |
| - double duration, |
| - ExceptionState& exceptionState) { |
| +AudioParam* AudioParam::setValueCurveAtTime( |
| + const MaybeShared<DOMFloat32Array>& maybeShared, |
| + double time, |
| + double duration, |
| + ExceptionState& exceptionState) { |
| + if (maybeShared.isShared()) { |
| + exceptionState.throwTypeError( |
| + "The provided curve is backed by a SharedArrayBuffer."); |
|
Raymond Toy
2017/03/06 20:06:33
DBC: Can we be consistent with the error messages
binji
2017/03/14 21:27:35
Yes, I was trying to be consistent with other erro
|
| + return nullptr; |
| + } |
| + DOMFloat32Array* curve = maybeShared.viewNotShared(); |
| + |
| float* curveData = curve->data(); |
| float min = minValue(); |
| float max = maxValue(); |