-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lifetime of pending processor construction data and exceptions in instantiation of AudioWorkletProcessor #2096
Comments
This is already in step 2 of the AWP construction algorithm: |
The issue is that "Construct a callback function" in the instantiation of AudioWorkletProcessor does not necessarily invoke the AudioWorkletProcessor() constructor. The AudioWorkletProcessor constructor would not be invoked, for example, if the user-provided processorCtor did not invoke I wonder whether step 2 of the AWP constructor should be moved to instantiation of AWP. |
…orkletProcessor throws. r=karlt WebAudio/web-audio-api#2096 Differential Revision: https://phabricator.services.mozilla.com/D64764
…orkletProcessor throws. r=karlt WebAudio/web-audio-api#2096 Differential Revision: https://phabricator.services.mozilla.com/D64764 --HG-- extra : moz-landing-system : lando
…orkletProcessor throws. r=karlt WebAudio/web-audio-api#2096 Differential Revision: https://phabricator.services.mozilla.com/D64764 UltraBlame original commit: 23e341cbee7f59d3ad4b2a23faff098279b686b0
…orkletProcessor throws. r=karlt WebAudio/web-audio-api#2096 Differential Revision: https://phabricator.services.mozilla.com/D64764 UltraBlame original commit: 23e341cbee7f59d3ad4b2a23faff098279b686b0
…orkletProcessor throws. r=karlt WebAudio/web-audio-api#2096 Differential Revision: https://phabricator.services.mozilla.com/D64764 UltraBlame original commit: 23e341cbee7f59d3ad4b2a23faff098279b686b0
The instantiation of AudioWorkletProcessor algorithm sets the node reference and transferred port of the AudioWorkletGlobalScope's pending processor construction data. AFAICS this data is cleared only in the AudioWorkletProcessor() constructor.
If an exception is thrown between setting the pending processor construction data and AudioWorkletProcessor construction, then that leaves the pending processor constructor data available after the instantiation of AudioWorkletProcessor algorithm completes. The pending processor construction data can then be used at another time for construction of an AudioWorkletProcessor and to obtain a reference to the MessagePort entangled with the MessagePort on the AudioWorkletNode. Is this intentional?
The rendering loop can run before the AudioWorkletProcessor is constructed in this way, in which case "Let processor be the associated AudioWorkletProcessor instance of AudioWorkletNode" can find there is no associated AudioWorkletProcessor. Would
process()
be called on subsequent iterations when the AudioWorkletProcessor is eventually constructed?Should the pending processor construction data instead be cleared at the completion of the instantiation of AudioWorkletProcessor algorithm, even when an exception is thrown during "Construct a callback function from processorCtor"?
Should a "processorerror" also be fired after an exception during the instantiation of AudioWorkletProcessor algorithm?
The text was updated successfully, but these errors were encountered: