Closed Bug 1613833 Opened 4 years ago Closed 4 years ago

PeriodicWave constructor does not allow zero-length real and imag

Categories

(Core :: Web Audio, defect, P3)

defect

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: bzbarsky, Assigned: koalab1999)

Details

Attachments

(3 files)

Consider this testcase:

var ctx = new AudioContext()
new PeriodicWave(ctx, { real: [], imag: [] })

In Firefox this throws. In Chrome it does not (though I don't know what the slots end up storing in that case; there's no obvious way to inspect them). Per spec it should not throw, I think, though the spec is confused enough around this stuff that who knows...

Is this a bug in Firefox or a bug in Chrome and the spec?

Flags: needinfo?(padenot)
Component: Audio/Video → Web Audio
Flags: needinfo?(padenot)
Priority: -- → P3

https://github.com/WebAudio/web-audio-api/pull/2168/files added some IndexSizeErrors for lengths less than 2.

OK. We should add tests for that... Ideally that would have happened as part of the spec change.

Severity: normal → S3

Throws are now centralized too.

Assignee: nobody → koalab1999
Status: NEW → ASSIGNED

Depends on D84665

Depends on D84666

Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/24828 for changes under testing/web-platform/tests
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

Creator:
Created:
Updated:
Size: