New issue
Advanced search Search tips

Issue 731242 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

start(-1) should throw RangeError

Project Member Reported by rtoy@chromium.org, Jun 8 2017

Issue description


OS: All
What steps will reproduce the problem?
(1) Run this in a console
c = new AudioContext()
n = new ConstantSourceNode(c)
try {
  n.start(-1);
} catch (e) {
  console.log(e.name);
}


What is the expected result?

The spec says a RangeError should be thrown

What happens instead?

An InvalidAccessError is thrown.


 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 12 2017

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

commit 1b00427e8d6862527b2b4c5763feb67165f905c0
Author: Raymond Toy <rtoy@chromium.org>
Date: Mon Jun 12 21:47:20 2017

Throw RangeError for invalid start/stop times

Calling start() or stop() with negative time values should throw
RangeError, not InvalidAccessError.  This also includes the offset and
duration parameters for AudioBufferSourceNode.start().

constant-source-basic.html,
oscillator-basic.html

Bug:  731242 
Test: audiobuffersource-basic.html,
Change-Id: Ide02d22a66712ba46aa1f0007c71ae24e78b88fe
Reviewed-on: https://chromium-review.googlesource.com/528479
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478776}
[delete] https://crrev.com/fd717664a4daae5b4356b9a91b562a9960f93813/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode-expected.txt
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/external/wpt/webaudio/the-audio-api/the-constantsourcenode-interface/test-constantsourcenode.html
[add] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/webaudio/AudioBufferSource/audiobuffersource-basic.html
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/webaudio/ConstantSource/constant-source-basic.html
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-basic.html
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt
[add] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/LayoutTests/webaudio/resources/start-stop-exceptions.js
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
[modify] https://crrev.com/1b00427e8d6862527b2b4c5763feb67165f905c0/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp

Comment 2 by rtoy@chromium.org, Jun 13 2017

Status: Fixed (was: Started)

Sign in to add a comment