Closed Bug 1648806 Opened 4 years ago Closed 4 years ago

AudioBuffer.getChannelData throws with length > 536870910

Categories

(Core :: Audio/Video, defect)

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: jkratzer, Unassigned)

References

(Blocks 1 open bug)

Details

I'm not sure if this is the intended behavior or not but it appears that AudioBuffer.getChannelData throws an invalid array index when a length greater than 536870910 is supplied:

// Success
new AudioBuffer({'length':536870910,'sampleRate':8000}).getChannelData(0)
// Throws 'invalid array length'
new AudioBuffer({'length':536870910+1,'sampleRate':8000}).getChannelData(0)

Paul Adenot pointed out on Matrix that this is expected due to the following:
https://searchfox.org/mozilla-central/source/js/src/vm/TypedArrayObject.cpp#908

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
Blocks: domino
You need to log in before you can comment on or make changes to this bug.