Skip to content

Commit 259a76a

Browse files
committed
Put data URL dedicated workers in their own agent cluster
Tests: * There should be a test for this where you create a data URL worker and try to message it SAB and WebAssembly.Module and check that it results in messageerror events. * web-platform-tests/wpt#21146 and web-platform-tests/wpt#22928 test that inside a data URL worker you can share memory with a further nested data URL worker that is same-origin with the opaque origin of the data URL worker. Fixes #5254.
1 parent 249553b commit 259a76a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

source

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88519,13 +88519,13 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
8851988519

8852088520
<p>To <dfn data-x="obtaining a worker/worklet agent">obtain a worker/worklet agent</dfn>, given an
8852188521
<span>environment settings object</span> or null <var>outside settings</var>, a boolean
88522-
<var>isTopLevel</var>, and a boolean <var>canBlock</var>, run these steps:</p>
88522+
<var>createsCluster</var>, and a boolean <var>canBlock</var>, run these steps:</p>
8852388523

8852488524
<ol>
8852588525
<li><p>Let <var>agentCluster</var> be null.
8852688526

88527-
<li><p>If <var>isTopLevel</var> is true, then set <var>agentCluster</var> to a new <span>agent
88528-
cluster</span>.</p></li>
88527+
<li><p>If <var>createsCluster</var> is true, then set <var>agentCluster</var> to a new
88528+
<span>agent cluster</span>.</p></li>
8852988529

8853088530
<li>
8853188531
<p>Otherwise:</p>
@@ -88550,9 +88550,9 @@ import "https://example.com/foo/../module2.mjs";</code></pre>
8855088550
</ol>
8855188551

8855288552
<p>To <dfn>obtain a dedicated/shared worker agent</dfn>, given an <span>environment settings
88553-
object</span> <var>outside settings</var> and a boolean <var>isShared</var>, return the result of
88554-
<span>obtaining a worker/worklet agent</span> given <var>outside settings</var>,
88555-
<var>isShared</var>, and true.</p>
88553+
object</span> <var>outside settings</var> and a boolean <var>createsCluster</var>, return the
88554+
result of <span>obtaining a worker/worklet agent</span> given <var>outside settings</var>,
88555+
<var>createsCluster</var>, and true.</p>
8855688556

8855788557
<p>To <dfn data-export="">obtain a worklet agent</dfn>, given an <span>environment settings
8855888558
object</span> <var>outside settings</var>, return the result of <span>obtaining a worker/worklet
@@ -97859,7 +97859,11 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9785997859

9786097860
<ol>
9786197861
<li><p>Let <var>is shared</var> be true if <var>worker</var> is a <code>SharedWorker</code>
97862-
object, and false otherwise.</p></li>
97862+
object; otherwise false.</p></li>
97863+
97864+
<li><p>Let <var>createsCluster</var> be true if <var>is shared</var> is true or <var>url</var>'s
97865+
<span data-x="concept-url-scheme">scheme</span> is "<code data-x="">data</code>"; otherwise
97866+
false.</p></li>
9786397867

9786497868
<li><p>Let <var>owner</var> be the <span>relevant owner to add</span> given <var>outside
9786597869
settings</var>.</p></li>
@@ -97872,7 +97876,7 @@ interface <dfn>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope</span> {
9787297876
<li>
9787397877
<p>Let <var>agent</var> be the result of <span data-x="obtain a dedicated/shared worker
9787497878
agent">obtaining a dedicated/shared worker agent</span> given <var>outside settings</var> and
97875-
<var>is shared</var>. Run the rest of these steps in that agent.</p>
97879+
<var>createsCluster</var>. Run the rest of these steps in that agent.</p>
9787697880

9787797881
<p id="worker-processing-model-top">For the purposes of timing APIs, this is the <dfn
9787897882
data-export="">official moment of creation</dfn> of the worker.</p>

0 commit comments

Comments
 (0)