New issue
Advanced search Search tips

Issue 615477 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

setValueCurveAtTime([1], ...) should throw because the curve is too short.

Project Member Reported by rtoy@chromium.org, May 27 2016

Issue description



What steps will reproduce the problem?
(1) Run this:

var c = new AudioContext();
var g = c.createGain();
g.gain.setValueCurveAtTime(Float32Array.from([1]), 0, 1)



What is the expected output?

An error should be thrown because the array is too short. See the description of the value array at http://webaudio.github.io/web-audio-api/#widl-AudioParam-setValueCurveAtTime-AudioParam-Float32Array-values-double-startTime-double-duration

Arrays of length less than two should throw an error.


What do you see instead?

No error is thrown.



 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0970fcf609bebf7792fcc9606983fad61e7da6a8

commit 0970fcf609bebf7792fcc9606983fad61e7da6a8
Author: rtoy <rtoy@chromium.org>
Date: Wed Jun 01 17:05:37 2016

Throw exception if curve is too short for setValueCurveAtTime

If the curve for setValueCurveAtTime is too short (length less than
2), an exception must be thrown.

BUG= 615477 
TEST=audioparam-setValueCurve-exceptions.html updated

Review-Url: https://codereview.chromium.org/2020753002
Cr-Commit-Position: refs/heads/master@{#397164}

[modify] https://crrev.com/0970fcf609bebf7792fcc9606983fad61e7da6a8/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions-expected.txt
[modify] https://crrev.com/0970fcf609bebf7792fcc9606983fad61e7da6a8/third_party/WebKit/LayoutTests/webaudio/audioparam-setValueCurve-exceptions.html
[modify] https://crrev.com/0970fcf609bebf7792fcc9606983fad61e7da6a8/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp

Comment 2 by rtoy@chromium.org, Jun 3 2016

Status: Fixed (was: Started)

Sign in to add a comment