From d4b0041ac54378c56459eaf72431af3b0f876716 Mon Sep 17 00:00:00 2001 From: Luke Warlow Date: Mon, 13 Jan 2025 15:27:27 +0000 Subject: [PATCH] Fix Trusted Type sink names for WorkerGlobalScope methods Previously we used Worker as the sink name prefix for WorkerGlobalScope importScripts, setTimeout, and setInterval. This was erroneous and this patch matches actual implementations. --- source | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source b/source index 0c7b65a152d..6f786bf34fa 100644 --- a/source +++ b/source @@ -115699,8 +115699,9 @@ enum DOMParserSupportedType {

If previousId was not given:

    -
  1. Let globalName be "Window" if global - is a Window object; "Worker" otherwise.

  2. +
  3. Let globalName be "Window" if global is + a Window object; "WorkerGlobalScope" + otherwise.

  4. Let methodName be "setInterval" if repeat is true; "setTimeout" otherwise.

  5. @@ -121887,9 +121888,9 @@ interface SharedWorker : EventTarget {
    1. Append the result of invoking the Get Trusted Type compliant string algorithm with TrustedScriptURL, this's relevant - global object, url, "Worker importScripts", and "script" to urlStrings.

    2. + data-x="tt-trustedscripturl">TrustedScriptURL, this's relevant global + object, url, "WorkerGlobalScope importScripts", and + "script" to urlStrings.