WebAudio / web-audio-api

The Web Audio API v1.0, developed by the W3C Audio WG
https://webaudio.github.io/web-audio-api/
Other
1.04k stars 165 forks source link

Handle failures of deserialization process in AudioWorkletProcessor's constructor algorithm #2546

Closed hoch closed 1 year ago

hoch commented 1 year ago

The current spec algorithm step doesn't handle a case when the deserialization of a transferred processorOptions fails.

This step can actually fail for some reasons; then the failure should be reported via AudioWorkletNode.onprocessorerror and it should cause the AudioWorkletNode/Processor non-functional. (i.e. failure at construction)

Reference: https://crbug.com/1429681

hoch commented 1 year ago

My mistake: https://webaudio.github.io/web-audio-api/#processor-construction-data (Step 8) already handles this case.