-
Notifications
You must be signed in to change notification settings - Fork 167
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
NewTarget check for AudioWorkletProcessor isn't actually possible with a Web IDL constructor #1963
Comments
Yeah, so #1447 (comment) was just not correct. :( |
Yes. AudioWorkletProcessor (render thread) is a counterpart of AudioWorkletNode (main thread). Without a node, a processor is meaningless because it can't be a part of the audio graph. As we already have seen, the current text is based on #1447 (comment), and we'll appreciate the guidance to fix this. Perhaps things have changed over 2 years... |
OK, but is that a reason to prevent it being constructed, at the cost of specification and implementation complexity? If someone just constructs a processor, they can't do anything useful with it. Fine. That means no one will do that in practice... But also, this approach doesn't actually solve that problem as described. If we take that current spec at face value, and code in the worklet does:
that is allowed by the current spec (because now
That comment is wrong in terms of what things
Here are some options:
If we do any of options 1-3 we still have to figure out what happens with the port stuff in those cases, exactly, so we might end up at option 4 by default. |
Thanks for your input. This is really helpful. I'll try to come up with a plan with the option 4. |
…construction Differential Revision: https://phabricator.services.mozilla.com/D55228 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1599952 gecko-commit: e56cf2dc1636e0dbb01632f9039ab0a7ad143dc1 gecko-integration-branch: autoland gecko-reviewers: bzbarsky
https://webaudio.github.io/web-audio-api/#AudioWorketProcessor-constructors step 1 says:
but there is no NewTarget or "active function object" available in a Web IDL constructor's steps. Those steps are handed the already-created to-be-initialized object and IDL values for the arguments; see https://heycam.github.io/webidl/#create-an-interface-object step 9.
Presumably this is trying to do something like what
[HTMLConstructor]
does, but note that this defined a separate extended attribute, with different semantics from IDL's[Constructor]
.Is there a specific reason to disallow directly constructing
AudioWorkletProcessor
instances?The text was updated successfully, but these errors were encountered: