Skip to content

Commit

Permalink
Fix Trusted Type sink names for WorkerGlobalScope methods
Browse files Browse the repository at this point in the history
Previously we used Worker as the sink name prefix for WorkerGlobalScope importScripts, setTimeout, and setInterval.

This was erroneous and this patch matches actual implementations.
  • Loading branch information
lukewarlow authored and annevk committed Jan 14, 2025
1 parent 290e61b commit d4b0041
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -115699,8 +115699,9 @@ enum <dfn enum>DOMParserSupportedType</dfn> {
<p>If <var>previousId</var> was not given:</p>

<ol>
<li><p>Let <var>globalName</var> be "<code data-x="">Window</code>" if <var>global</var>
is a <code>Window</code> object; "<code data-x="">Worker</code>" otherwise.</p></li>
<li><p>Let <var>globalName</var> be "<code data-x="">Window</code>" if <var>global</var> is
a <code>Window</code> object; "<code data-x="">WorkerGlobalScope</code>"
otherwise.</p></li>

<li><p>Let <var>methodName</var> be "<code data-x="">setInterval</code>" if
<var>repeat</var> is true; "<code data-x="">setTimeout</code>" otherwise.</p></li>
Expand Down Expand Up @@ -121887,9 +121888,9 @@ interface <dfn interface>SharedWorker</dfn> : <span>EventTarget</span> {
<ol>
<li><p><span data-x="list append">Append</span> the result of invoking the <span
data-x="tt-getcompliantstring">Get Trusted Type compliant string</span> algorithm with <code
data-x="tt-trustedscripturl">TrustedScriptURL</code>, <span>this</span>'s <span>relevant
global object</span>, <var>url</var>, "<code data-x="">Worker importScripts</code>", and "<code
data-x="">script</code>" to <var>urlStrings</var>.</p></li>
data-x="tt-trustedscripturl">TrustedScriptURL</code>, <span>this</span>'s <span>relevant global
object</span>, <var>url</var>, "<code data-x="">WorkerGlobalScope importScripts</code>", and
"<code data-x="">script</code>" to <var>urlStrings</var>.</p></li>
</ol>
</li>

Expand Down

0 comments on commit d4b0041

Please sign in to comment.