Closed Bug 1596594 Opened 5 years ago Closed 5 years ago

webaudio/js/worklet-recorder.js sends multiple 'recordfinished' messages

Categories

(Core :: Web Audio, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: karlt, Assigned: karlt)

References

Details

Attachments

(1 file)

When a 'recorder-processor' AudioWorkletNode has active inputs, it sends a 'recordfinished' message on every rendering quantum after _recordBufferLength is reached.

This results in webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/cors-check.https.html and webaudio/the-audio-api/the-mediaelementaudiosourcenode-interface/no-cors.https.html repeatedly calling task.done().

e.g. https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=276147649&repo=try&lineNumber=79867

so that 'recordfinished' is not sent again.

Additional messages posted are dropped without error.

close()ing to disentangle the MessagePort is also good practice as it allows
GC of otherwise unused objects.

Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06248120ae60
close MessagePort after 'recordfinished' is sent r=padenot
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/20292 for changes under testing/web-platform/tests
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: