Skip to content

Put data URL dedicated workers in their own agent cluster #5476

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -96580,13 +96580,13 @@ new PaymentRequest(…); // Allowed to use

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

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

<li>
<p>If <var>isTopLevel</var> is true, then:</p>
<p>If <var>createsCluster</var> is true, then:</p>

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

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

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

<ol>
<li><p>Let <var>is shared</var> be true if <var>worker</var> is a <code>SharedWorker</code>
object, and false otherwise.</p></li>
object; otherwise false.</p></li>

<li>
<p>Let <var>createsCluster</var> be true if <var>is shared</var> is true or <var>url</var>'s
<span data-x="concept-url-scheme">scheme</span> is "<code data-x="">data</code>"; otherwise
false.</p>

<p class="note"><var>url</var> can be used here, because a redirect to a <span data-x="data
protocol"><code>data:</code> URL</span> results in a network error.</p>
<!-- Nevertheless we probably ought to move this in due course to support sandboxing:
https://github.com/w3c/webappsec-csp/issues/279 -->
</li>

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

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

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