Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

cancelScheduledValues and cancelAndHoldAtTime throws RangeError for non-finite #127

Closed
rtoy opened this issue May 24, 2021 · 0 comments · Fixed by WebAudio/web-audio-api#2352
Labels
editorial Behaviour is clear -- grammar, phrasing or typos, alongside some clarifications

Comments

@rtoy
Copy link
Member

rtoy commented May 24, 2021

Describe the issue
The description for cancelTime parameter for both cancelScheduledValues and cancelAndHoldAtTime says that non-finite values should throw a RangeError. However, since the declared type is double and not unrestricted double, a TypeError is thrown instead.

We should update the text to say that a RangeError is thrown for negative values (deleting the part about non-finite values).

Where Is It
For cancelScheduledValues, see https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelscheduledvalues-canceltime

For cancelAndHoldAtTime, see https://webaudio.github.io/web-audio-api/#dom-audioparam-cancelandholdattime-canceltime

@rtoy rtoy added Needs WG Review New issues filed that needs reviewing editorial Behaviour is clear -- grammar, phrasing or typos, alongside some clarifications labels May 24, 2021
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 24, 2021
The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 25, 2021
The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this issue May 25, 2021
The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}
blueboxd pushed a commit to blueboxd/chromium-legacy that referenced this issue May 25, 2021
The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 27, 2021
…for negative values, a=testonly

Automatic update from web-platform-tests
cancelScheduledValues throws RangeError for negative values

The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}

--

wpt-commits: 682303d8b58d63d4b5ec35f060adb27f2c6b2747
wpt-pr: 29091
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 27, 2021
…for negative values, a=testonly

Automatic update from web-platform-tests
cancelScheduledValues throws RangeError for negative values

The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}

--

wpt-commits: 682303d8b58d63d4b5ec35f060adb27f2c6b2747
wpt-pr: 29091
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue May 29, 2021
…for negative values, a=testonly

Automatic update from web-platform-tests
cancelScheduledValues throws RangeError for negative values

The spec clearly states that cancelScheduledValues must throw a
RangeError for negative values.  Make it so, and add a test for this.
We also add tests for NaN and Infinity.

Note, however, that the spec says RangeError is also thrown for
non-finite values.  This is incorrect since cancelTime is a double,
not unrestricted double.  (See
WebAudio/web-audio-api-v2#127)

Thus, the test throws TypeError for NaN and Infinity.

Bug: 1212307
Change-Id: I750ab0f2b9f17f94d04cb2e9422b4f626252dfbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2909615
Reviewed-by: Hongchan Choi <[email protected]>
Commit-Queue: Raymond Toy <[email protected]>
Cr-Commit-Position: refs/heads/master@{#886277}

--

wpt-commits: 682303d8b58d63d4b5ec35f060adb27f2c6b2747
wpt-pr: 29091
@rtoy rtoy removed the Needs WG Review New issues filed that needs reviewing label Jun 2, 2021
rtoy pushed a commit to rtoy/web-audio-api that referenced this issue Jun 4, 2021
Fixes WebAudio/web-audio-api-v2#127 by removing the text that says a
`RangeError` is also thrown for non-finite values.  That's not
possible because the type of `cancelTime` is `double`, not
`unrestricted double`.  Non-finite values are handled at a higher
level before these methods even see the number.
padenot pushed a commit to rtoy/web-audio-api that referenced this issue Aug 26, 2021
Fixes WebAudio/web-audio-api-v2#127 by removing the text that says a
`RangeError` is also thrown for non-finite values.  That's not
possible because the type of `cancelTime` is `double`, not
`unrestricted double`.  Non-finite values are handled at a higher
level before these methods even see the number.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editorial Behaviour is clear -- grammar, phrasing or typos, alongside some clarifications
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant