Closed Bug 1614038 Opened 4 years ago Closed 4 years ago

Improve Web Audio API error reporting

Categories

(Core :: Web Audio, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla75
Tracking Status
firefox75 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

Details

Attachments

(2 files)

No description provided.

This is based on looking at what the actual spec constraints around the
channelCount, channelCountMode, and channelInterpretation setters are and on
testing Chrome's behavior: the setters can be called as long as you do it with
the current value. That said, the spec sure could use being clearer here; the
style it's using is pretty hard to follow, unfortunately.

The change to throw NotSupportedError in AudioContext::CreateBuffer is
purposeful, to align with the spec and Chrome. There's apparently no web
platform test coverage for this.

The change to AudioContext::Close is fixing what looks like an obvious bug to
me (it resolved a Promise<void> with a DOMException!). No obvious test coverage.

The change to throw RangeError in OscillatorNode::Start is purposeful, to align
wih the spec and Chrome. Again, there's apparently no test coverage.

The change to throw RangeError in OscillatorNode::Stop is purposeful, to align
wih the spec and Chrome. Again, there's apparently no test coverage.

Component: Audio/Video → Web Audio
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4f53c38746a4
part 1.  Fix ChannelSplitterNode to follow the spec for its setters. r=padenot
https://hg.mozilla.org/integration/autoland/rev/206715adc178
part 2.  Improve error reporting in webaudio code. r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/21758 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: