diff --git a/source b/source index 3b857f2486c..1376405d014 100644 --- a/source +++ b/source @@ -3008,6 +3008,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The ObjectCreate abstract operation
  • The ParseModule abstract operation
  • The ParseScript abstract operation
  • +
  • The PromiseReactionJob abstract operation
  • +
  • The PromiseResolveThenableJob abstract operation
  • The RegExpBuiltinExec abstract operation
  • The RegExpCreate abstract operation
  • The RunJobs abstract operation
  • @@ -91021,15 +91023,32 @@ document.querySelector("button").addEventListener("click", bound);
  • Assert: queueName is "PromiseJobs". ("ScriptJobs" must not be used by user agents.)

  • +
  • Assert: job is either PromiseResolveThenableJob or + PromiseReactionJob. (The following steps would need to be updated if another type of + promise job were introduced.)

  • +
  • -

    Let job settings be some appropriate environment settings object.

    +

    Let job settings be determined by switching on job:

    + +
    +
    PromiseResolveThenableJob
    +
    +

    The settings object for + arguments[2].[[Realm]]. (I.e., the Realm of + the then function.)

    +
    -

    It is not yet clear how to specify the environment settings - object that should be used here. In practice, this means that the entry concept is not correctly specified while - executing a job. See discussion in issue - #1189.

    +
    PromiseReactionJob
    +
    +

    If arguments[0].[[Handler]] is not undefined, then the settings object of + arguments[0].[[Handler]].[[Realm]]; otherwise, null.

    + +

    If the handler is undefined, then we are in a case like promise.then(null, null). In this case, no author code will run, so all of + the steps below that would otherwise use job settings get skipped.

    +
    +
  • Let incumbent settings be the incumbent settings object.

  • @@ -91084,15 +91103,16 @@ document.querySelector("button").addEventListener("click", bound);
  • -

    Queue a microtask, on job settings's responsible event - loop, to perform the following steps:

    +

    Queue a microtask on the surrounding agent's event + loop to perform the following steps:

      -
    1. Check if we can run script with job settings. If this returns - "do not run" then return.

    2. +
    3. If job settings is not null, then check if we can run script + with job settings. If this returns "do not run" then return.

    4. -

      Prepare to run script with job settings.

      +

      If job settings is not null, then prepare to run script with + job settings.

      This affects the entry concept while the job runs.

      @@ -91124,7 +91144,8 @@ document.querySelector("button").addEventListener("click", bound);
    5. Clean up after running a callback with incumbent settings.

    6. -
    7. Clean up after running script with job settings.

    8. +
    9. If job settings is not null, then clean up after running script + with job settings.

    10. If result is an abrupt completion, then report the exception given by result.[[Value]].