From 7128df76d76cbfdedbf9ff889f4dca431609d03e Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Tue, 25 Nov 2025 23:26:29 -0500 Subject: [PATCH 1/5] IHDR might add a _customizations_ parameter --- source | 85 ++++++++++++++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 32 deletions(-) diff --git a/source b/source index a65eae126d1..9a6840b365f 100644 --- a/source +++ b/source @@ -104473,15 +104473,21 @@ interface NotRestoredReasons { origin, group, and false.

  • -

    Let realm execution context be the result of creating a new realm - given agent and the following customizations:

    +

    Let customizations be the following algorithm given a realm realm:

    - +
  • Let globalThisBinding be browsingContext's WindowProxy + object.
  • + +
  • Return « global, globalThisBinding ».
  • + + + +
  • +

    Let realm execution context be the result of creating a new realm + given agent and customizations.

  • Let topLevelCreationURL be about:blank if embedder is @@ -111268,15 +111274,21 @@ location.href = '#foo'; requestsOAC.

  • -

    Let realmExecutionContext be the result of creating a new realm - given agent and the following customizations:

    +

    Let customizations be the following algorithm given a realm realm:

    - +
  • Let globalThisBinding be browsingContext's WindowProxy + object.
  • + +
  • Return « global, globalThisBinding ».
  • + + + +
  • +

    Let realmExecutionContext be the result of creating a new realm + given agent and customizations.

  • Set window to the global @@ -115430,13 +115442,12 @@ new PaymentRequest(…); // Allowed to use

    To create a new - realm in an agent agent, optionally with instructions to create a - global object or a global this binding (or both), the following steps are taken:

    + realm in an agent agent, with a customizations algorithm + customizations, the following steps are taken:

      -
    1. Perform InitializeHostDefinedRealm() - with the provided customizations for creating the global object and the global this - binding.

    2. +
    3. Perform InitializeHostDefinedRealm(customizations).

    4. Let realm execution context be the running JavaScript execution @@ -130657,14 +130668,18 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope is shared. Run the rest of these steps in that agent.

    5. -

      Let realm execution context be the result of creating a new realm - given agent and the following customizations:

      +

      Let customizations be the following algorithm given a realm realm:

      -
        -
      • For the global object, if is shared is true, create a new - SharedWorkerGlobalScope object. Otherwise, create a new - DedicatedWorkerGlobalScope object.

      • -
      +
        +
      1. Let global be a new SharedWorkerGlobalScope object if is shared is true; otherwise a new DedicatedWorkerGlobalScope object.
      2. + +
      3. Return « global, undefined ».
      4. +
      +
    6. + +
    7. +

      Let realm execution context be the result of creating a new realm + given agent and customizations.

    8. @@ -132229,13 +132244,19 @@ interface WorkletGlobalScope {}; agent.

    9. -

      Let realmExecutionContext be the result of creating a new realm given - agent and the following customizations:

      +

      Let customizations be the following algorithm given a realm realm:

      -
        -
      • For the global object, create a new object of the type given by worklet's - worklet global scope type.

      • -
      +
        +
      1. Let global be a new object of the type given by worklet's + worklet global scope type.
      2. + +
      3. Return « global, undefined ».
      4. +
      +
    10. + +
    11. +

      Let realmExecutionContext be the result of creating a new realm given + agent and customizations.

    12. Let workletGlobalScope be the global From 772b5a58d0cb7c94c35c18602bacde1846b1df48 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Tue, 25 Nov 2025 23:32:10 -0500 Subject: [PATCH 2/5] IHDR might return the realm execution context ... rather that pushing it onto the execution context stack. --- source | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/source b/source index 9a6840b365f..c5ebdbe9033 100644 --- a/source +++ b/source @@ -115446,20 +115446,9 @@ new PaymentRequest(…); // Allowed to use customizations, the following steps are taken:

        -
      1. Perform

        Let realm execution context be InitializeHostDefinedRealm(customizations).

      2. -
      3. -

        Let realm execution context be the running JavaScript execution - context.

        - -

        This is the JavaScript execution context created in the previous - step.

        -
      4. - -
      5. Remove realm execution context from the JavaScript execution context - stack.

      6. -
      7. Let realm be realm execution context's Realm component.

      8. From 6fca7d2285d6abc20ec1edada3fed50d1e50e2df Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Tue, 25 Nov 2025 23:36:01 -0500 Subject: [PATCH 3/5] IHDR might be renamed 'MakeRealm' --- source | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source b/source index c5ebdbe9033..e53714fd358 100644 --- a/source +++ b/source @@ -3117,7 +3117,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
      9. The HostLoadImportedModule abstract operation
      10. The HostMakeJobCallback abstract operation
      11. The HostPromiseRejectionTracker abstract operation
      12. -
      13. The InitializeHostDefinedRealm abstract operation
      14. +
      15. The MakeRealm abstract operation
      16. The IsArrayBufferViewOutOfBounds abstract operation
      17. The IsAccessorDescriptor abstract operation
      18. The IsCallable abstract operation
      19. @@ -115447,7 +115447,7 @@ new PaymentRequest(…); // Allowed to use
        1. Let realm execution context be InitializeHostDefinedRealm(customizations).

        2. + data-x="js-MakeRealm">MakeRealm(customizations).

        3. Let realm be realm execution context's Realm component.

        4. From 9f6650033fdc9d66348bffea342adea41a12411b Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 27 Nov 2025 21:57:20 -0500 Subject: [PATCH 4/5] tweak linebreaking --- source | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/source b/source index e53714fd358..0664bcc4960 100644 --- a/source +++ b/source @@ -104485,10 +104485,8 @@ interface NotRestoredReasons {
        -
      20. -

        Let realm execution context be the result of creating a new realm - given agent and customizations.

        -
      21. +
      22. Let realm execution context be the result of creating a new realm + given agent and customizations.

      23. Let topLevelCreationURL be about:blank if embedder is null; otherwise embedder's relevant settings object's top-level @@ -111286,10 +111284,8 @@ location.href = '#foo';

    13. -
    14. -

      Let realmExecutionContext be the result of creating a new realm - given agent and customizations.

      -
    15. +
    16. Let realmExecutionContext be the result of creating a new realm + given agent and customizations.

    17. Set window to the global object of realmExecutionContext's Realm component.

    18. @@ -130666,10 +130662,8 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope
  • -
  • -

    Let realm execution context be the result of creating a new realm - given agent and customizations.

    -
  • +
  • Let realm execution context be the result of creating a new realm + given agent and customizations.

  • Let worker global scope be the global @@ -132243,10 +132237,8 @@ interface WorkletGlobalScope {};

  • -
  • -

    Let realmExecutionContext be the result of creating a new realm given - agent and customizations.

    -
  • +
  • Let realmExecutionContext be the result of creating a new realm + given agent and customizations.

  • Let workletGlobalScope be the global object of realmExecutionContext's Realm component.

  • From 91f0f095b0ba182a8003020e7c34b2970bfe20ee Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Thu, 27 Nov 2025 22:01:02 -0500 Subject: [PATCH 5/5] Delete "the following steps are taken" --- source | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source b/source index 0664bcc4960..2fe1cb54d3c 100644 --- a/source +++ b/source @@ -115439,7 +115439,7 @@ new PaymentRequest(…); // Allowed to use

    To create a new realm in an agent agent, with a customizations algorithm - customizations, the following steps are taken:

    + customizations:

    1. Let realm execution context be