[Webkit-unassigned] [Bug 118405] Update Exception handling in WebAudio

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 4 23:36:29 PDT 2013


https://bugs.webkit.org/show_bug.cgi?id=118405





--- Comment #2 from Christophe Dumez <dchris at gmail.com>  2013-07-04 23:38:28 PST ---
(From update of attachment 206122)
View in context: https://bugs.webkit.org/attachment.cgi?id=206122&action=review

> Source/WebCore/ChangeLog:8
> +        AudioBufferSourceNode, OscillatorNode and AnalyserNode don't propagate any exceptions specified in WebAudio spec.

Throwing new exceptions is risky business when it comes to backward compatibility.

> Source/WebCore/Modules/webaudio/AudioContext.cpp:555
> +        ec = INDEX_SIZE_ERR;

Where is this exception name specified?

> Source/WebCore/Modules/webaudio/AudioContext.cpp:601
> +    if (!real || !imag || (real->length() != imag->length() || (real->length() > 4096))) {

Would be nice to have a global static const variable for that magic number. Alsom , the spec says that the value should be greater than 0 but it does not seem to be covered, right?

> Source/WebCore/Modules/webaudio/AudioContext.cpp:602
> +        ec = INDEX_SIZE_ERR;

Does the spec actually specify it needs to be a IndexSizeError and not a SyntaxError? I cannot find it.

> LayoutTests/webaudio/analyser-exception.html:34
> +    shouldThrow("analyser.minDecibels = -20");

shouldThrow() can take a second argument with the exception name to validate that as well. If you expect a specific exception, you probably want to add that (although the spec does not seem to indicate exception names?)

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list