Wrong error type when connecting an audio node to a node from a different context. |
||
Issue description
OS: All
What steps will reproduce the problem?
(1) Run the following in a dev console (or something)
c0 = new AudioContext();
c1 = new AudioContext();
n = new OscillatorNode(c0);
try {
n.connect(c1.destination);
} catch (e) {
console.log(e.name);
}
(2)
(3)
What is the expected result?
e.name should be InvalidAccessError according to https://webaudio.github.io/web-audio-api/#widl-AudioNode-connect-AudioNode-AudioNode-destination-unsigned-long-output-unsigned-long-input
What happens instead?
Chrome throws a SyntaxError instead.
,
Jan 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f2c4a3b373c281d37f2a92717ebb63f7787463ba commit f2c4a3b373c281d37f2a92717ebb63f7787463ba Author: rtoy <rtoy@chromium.org> Date: Thu Jan 19 18:59:02 2017 Throw correct error when connecting to different context. When connecting an AudioNode to a node from a different context, we were throwing a SyntaxError instead of an InvalidAccessError as specified in https://webaudio.github.io/web-audio-api/#widl-AudioNode-connect-AudioNode-AudioNode-destination-unsigned-long-output-unsigned-long-input Throw the expected error type. BUG= 682040 TEST=audionode-connect-method-chaining.html Review-Url: https://codereview.chromium.org/2632373003 Cr-Commit-Position: refs/heads/master@{#444805} [modify] https://crrev.com/f2c4a3b373c281d37f2a92717ebb63f7787463ba/third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-method-chaining-expected.txt [modify] https://crrev.com/f2c4a3b373c281d37f2a92717ebb63f7787463ba/third_party/WebKit/LayoutTests/webaudio/AudioNode/audionode-connect-method-chaining.html [modify] https://crrev.com/f2c4a3b373c281d37f2a92717ebb63f7787463ba/third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt [modify] https://crrev.com/f2c4a3b373c281d37f2a92717ebb63f7787463ba/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
,
Jan 20 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by rtoy@chromium.org
, Jan 18 2017Status: Started (was: Available)