Skip to content

Commit 70a35c4

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 dc27ce8 commit 70a35c4

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

source

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96580,13 +96580,13 @@ new PaymentRequest(…); // Allowed to use
9658096580

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

9658596585
<ol>
9658696586
<li><p>Let <var>agentCluster</var> be null.
9658796587

9658896588
<li>
96589-
<p>If <var>isTopLevel</var> is true, then:</p>
96589+
<p>If <var>createsCluster</var> is true, then:</p>
9659096590

9659196591
<ol>
9659296592
<li><p>Set <var>agentCluster</var> to a new <span>agent cluster</span>.</p></li>
@@ -96625,9 +96625,9 @@ new PaymentRequest(&hellip;); // Allowed to use
9662596625
</ol>
9662696626

9662796627
<p>To <dfn>obtain a dedicated/shared worker agent</dfn>, given an <span>environment settings
96628-
object</span> <var>outside settings</var> and a boolean <var>isShared</var>, return the result of
96629-
<span>obtaining a worker/worklet agent</span> given <var>outside settings</var>,
96630-
<var>isShared</var>, and true.</p>
96628+
object</span> <var>outside settings</var> and a boolean <var>createsCluster</var>, return the
96629+
result of <span>obtaining a worker/worklet agent</span> given <var>outside settings</var>,
96630+
<var>createsCluster</var>, and true.</p>
9663196631

9663296632
<p>To <dfn>obtain a worklet agent</dfn>, given an <span>environment settings object</span>
9663396633
<var>outside settings</var>, return the result of <span>obtaining a worker/worklet agent</span>
@@ -109194,7 +109194,18 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
109194109194

109195109195
<ol>
109196109196
<li><p>Let <var>is shared</var> be true if <var>worker</var> is a <code>SharedWorker</code>
109197-
object, and false otherwise.</p></li>
109197+
object; otherwise false.</p></li>
109198+
109199+
<li>
109200+
<p>Let <var>createsCluster</var> be true if <var>is shared</var> is true or <var>url</var>'s
109201+
<span data-x="concept-url-scheme">scheme</span> is "<code data-x="">data</code>"; otherwise
109202+
false.</p>
109203+
109204+
<p class="note"><var>url</var> can be used here, because a redirect to a <span data-x="data
109205+
protocol"><code>data:</code> URL</span> results in a network error.</p>
109206+
<!-- Nevertheless we probably ought to move this in due course to support sandboxing:
109207+
https://github.com/w3c/webappsec-csp/issues/279 -->
109208+
</li>
109198109209

109199109210
<li><p>Let <var>owner</var> be the <span>relevant owner to add</span> given <var>outside
109200109211
settings</var>.</p></li>
@@ -109210,7 +109221,7 @@ interface <dfn interface>SharedWorkerGlobalScope</dfn> : <span>WorkerGlobalScope
109210109221

109211109222
<li><p>Let <var>agent</var> be the result of <span data-x="obtain a dedicated/shared worker
109212109223
agent">obtaining a dedicated/shared worker agent</span> given <var>outside settings</var> and
109213-
<var>is shared</var>. Run the rest of these steps in that agent.</p></li>
109224+
<var>createsCluster</var>. Run the rest of these steps in that agent.</p></li>
109214109225

109215109226
<li>
109216109227
<p>Let <var>realm execution context</var> be the result of <span>creating a new realm</span>

0 commit comments

Comments
 (0)