New issue
Advanced search Search tips

Issue 702622 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

OfflineAudioContext throws incorrect errors for invalid values

Project Member Reported by rtoy@chromium.org, Mar 17 2017

Issue description

The spec says the constructor for OfflineAudioContext must throw NotSupportedError for values outside the allowed range.  We don't:

Ok:
try { new OfflineAudioContext(0,1,8000) } catch (e) { console.log(e.name); }
NotSupportedError

Wrong:
try { new OfflineAudioContext(1,0,8000) } catch (e) { console.log(e.name); }
SyntaxError (!!!!?)

try { new OfflineAudioContext(1,1,1) } catch (e) { console.log(e.name); }
IndexSizeError (!!!!?)

try { new OfflineAudioContext(99,1,8000) } catch (e) { console.log(e.name); }
IndexSizeError
 

Comment 1 by rtoy@chromium.org, Mar 17 2017

Summary: OfflineAudioContext throws incorrect errors for invalid values (was: OfflienAudioContext throws incorrect errors for invalid values)
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 20 2017

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

commit 4bfa49a0874b7cae2c5d04fd816f01345666fc76
Author: rtoy <rtoy@chromium.org>
Date: Mon Mar 20 16:39:18 2017

Throw correct errors for invalid OfflineAudioContext values

The spec basically says invalid values when constructing an
OfflineAudioContext should throw NotSupportedError.  We were throwing
a strange collection of SyntaxError and IndexSizeError along with
NotSupportedError.

BUG= 702622 
TEST=dom-exceptions.html

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

[modify] https://crrev.com/4bfa49a0874b7cae2c5d04fd816f01345666fc76/third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt
[modify] https://crrev.com/4bfa49a0874b7cae2c5d04fd816f01345666fc76/third_party/WebKit/LayoutTests/webaudio/dom-exceptions.html
[modify] https://crrev.com/4bfa49a0874b7cae2c5d04fd816f01345666fc76/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp

Comment 3 by rtoy@chromium.org, Mar 21 2017

Status: Fixed (was: Started)

Sign in to add a comment