From e01444f47a724bcabf0868c4f126799c878a3aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Mon, 24 Jul 2023 08:15:05 +0200 Subject: [PATCH] Use correct settings object for modules imported in workers Fixes #9535. --- source | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/source b/source index 8b2539c3849..6d034b2e13a 100644 --- a/source +++ b/source @@ -103380,7 +103380,7 @@ document.querySelector("button").addEventListener("click", bound);

To fetch the descendants of and link a module script moduleScript, given an environment - settings object settingsObject, a fetchClient, a destination destination, an algorithm onComplete, and an optional perform the fetch hook performFetch, run @@ -103405,7 +103405,7 @@ document.querySelector("button").addEventListener("click", bound);

  • Let state be Record { [[ParseError]]: null, [[Destination]]: - destination, [[PerformFetch]]: null, [[SettingsObject]]: settingsObject + destination, [[PerformFetch]]: null, [[FetchClient]]: fetchClient }.

  • If performFetch was given, set state.[[PerformFetch]] to @@ -103598,9 +103598,10 @@ document.querySelector("button").addEventListener("click", bound);

    To fetch a single imported module script, given a URL url, - an environment settings object settingsObject, a environment settings object fetchClient, a destination destination, a script - fetch options options, a referrer + fetch options options, environment settings object + settingsObject, a referrer referrer, a ModuleRequest Record moduleRequest, an algorithm onComplete, and an optional perform the fetch hook performFetch, run @@ -103620,7 +103621,7 @@ document.querySelector("button").addEventListener("click", bound); moduleType and settingsObject is false, then run onComplete given null, and return.

  • -
  • Fetch a single module script given url, settingsObject, +

  • Fetch a single module script given url, fetchClient, destination, options, settingsObject, referrer, moduleRequest, false, and onComplete. If performFetch was given, pass it along as well.

  • @@ -105858,21 +105859,23 @@ import "https://example.com/foo/../module2.mjs";
  • Let destination be "script".

  • +
  • Let fetchClient be settingsObject.

  • +
  • If loadState is not undefined, then:

    1. Set destination to loadState.[[Destination]].

    2. -
    3. Set settingsObject loadState.[[SettingsObject]].

    4. +
    5. Set fetchClient loadState.[[FetchClient]].

  • Fetch a single imported module script given url, - settingsObject, destination, fetchOptions, - fetchReferrer, moduleRequest, and onSingleFetchComplete as - defined below. If loadState is not undefined and + fetchClient, destination, fetchOptions, + settingsObject fetchReferrer, moduleRequest, and + onSingleFetchComplete as defined below. If loadState is not undefined and loadState.[[PerformFetch]] is not null, pass loadState.[[PerformFetch]] along as well.