Skip to content
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

Move some steps from AudioWorkletProcessor constructor to the instantiation algorithm #2306

Merged
merged 1 commit into from Mar 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
30 changes: 8 additions & 22 deletions index.bs
Expand Up @@ -10074,9 +10074,14 @@ the <a>rendering thread</a> will invoke the algorithm below:
of this {{AudioWorkletGlobalScope}}'s
[=pending processor construction data=] respectively.

1. <a spec=webidl lt=construct>Construct a callback function</a>
from <var>processorCtor</var> with the argument of
<var>deserializedOptions</var>.
1. <a spec=webidl lt=construct>Construct a callback function</a> from |processorCtor| with the argument
of |deserializedOptions|. If any exceptions are thrown in the callback, <a>queue a task</a> to
the <a>control thread</a> to <a spec="dom" lt="fire an event">fire an event</a> named
`processorerror` using
<a href="https://www.w3.org/TR/html50/webappapis.html#the-errorevent-interface">ErrorEvent</a>
at |nodeReference|.

1. Empty the [=pending processor construction data=] slot.
</div>

<h4 interface lt="AudioWorkletNode">
Expand Down Expand Up @@ -10454,22 +10459,6 @@ Constructors</h5>
Throw a {{TypeError}} exception if the slot is
empty.

1. If any of following steps throws any exception,
perform these substeps:

1. Empty the
[=pending processor construction data=]
slot.

2. Abort the rest of the constructor algorithm
and <a>queue a task</a> to the
<a>control thread</a>
to <a spec="dom" lt="fire an event">fire
an event</a> named
<code>processorerror</code> using
<a href="https://www.w3.org/TR/html50/webappapis.html#the-errorevent-interface">ErrorEvent</a>
at <var>nodeReference</var>.

1. Let <var>processor</var> be the
<a spec="webidl" lt="this">this</a> value.

Expand All @@ -10488,9 +10477,6 @@ Constructors</h5>
1. Set <var>processor</var>’s
{{AudioWorkletProcessor/port}}
to <var>deserializedPort</var>.

1. Empty the [=pending processor construction data=]
slot.
</div>
</dl>

Expand Down