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
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:
+ +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.
+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.
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:
Check if we can run script with job settings. If this returns - "do not run" then return.
If job settings is not null, then check if we can run script + with job settings. If this returns "do not run" then return.
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);Clean up after running a callback with incumbent settings.
Clean up after running script with job settings.
If job settings is not null, then clean up after running script + with job settings.
If result is an abrupt completion, then report the exception given by result.[[Value]].