Skip to content

Commit

Permalink
Fire an error event for parse errors when constructing SharedWorker
Browse files Browse the repository at this point in the history
This aligns the behavior of parse errors in a SharedWorker with fetch
failures. See discussion in #5323, which has gone beyond that to also
discuss other types of errors, but for now we have agreement on parse
errors at least.
  • Loading branch information
elkurin authored Mar 13, 2020
1 parent 8a285a2 commit c747ce0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -101577,13 +101577,17 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
fetch</span> steps with <var>response</var>.</p></li>
</ol>

<p>If the algorithm asynchronously completes with null, then:</p>
<p>If the algorithm asynchronously completes with null or with a <var>script</var> whose <span
data-x="concept-script-error-to-rethrow">error to rethrow</span> is non-null, then:</p>

<ol>
<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span> named
<code data-x="event-error">error</code> at <var>worker</var>.</p></li>
<li><p>Run the <span data-x="environment discarding steps">environment discarding steps</span>
for <var>inside settings</var>.</p></li>
<li><p>Return.</p></li>
<li><p><span>Queue a task</span> to <span data-x="concept-event-fire">fire an event</span>
named <code data-x="event-error">error</code> at <var>worker</var>.</p></li>

<li><p>Run the <span data-x="environment discarding steps">environment discarding steps</span>
for <var>inside settings</var>.</p></li>

<li><p>Return.</p></li>
</ol>

<p>Otherwise, continue the rest of these steps after the algorithm's asynchronous completion,
Expand Down

0 comments on commit c747ce0

Please sign in to comment.