OfflineAudioContext throws incorrect errors for invalid values |
||
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
,
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
,
Mar 21 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Mar 17 2017