Skip to content

Commit 2bcde42

Browse files
annevkdomenic
authored andcommitted
Do not throw from cross-process code in the SharedWorker constructor
Instead dispatch an error event from a task so any interprocess communication can happen asynchronously. At least in theory. Fixes part of whatwg#1819.
1 parent d23995b commit 2bcde42

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97404,9 +97404,9 @@ interface <dfn>SharedWorker</dfn> : <span>EventTarget</span> {
9740497404

9740597405
<li><p>If the result of executing <span>Is environment settings object a secure
9740697406
context?</span> on <var>outside settings</var> does not match the result of executing
97407-
the same algorithm on <var>settings object</var>, then throw a
97408-
<span>"<code>SecurityError</code>"</span> <code>DOMException</code> and abort these steps.
97409-
<ref spec="SECURE-CONTEXTS"></li>
97407+
the same algorithm on <var>settings object</var>, then <span>queue a task</span> to
97408+
<span>fire a simple event</span> named <code data-x="event-error">error</code> at
97409+
<var>worker</var> and return <var>worker</var>. <ref spec="SECURE-CONTEXTS"></p></li>
9741097410

9741197411
<li><p>Associate <var>worker</var> with <var>worker global scope</var>.</p></li>
9741297412

0 commit comments

Comments
 (0)