diff --git a/source b/source index 7790765471f..420ccc60cb5 100644 --- a/source +++ b/source @@ -2955,6 +2955,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute constructing callback functions
blob":
Assert: workerGlobalScope's owner set's size is 1.
Assert: workerGlobalScope's relevant settings + object's owner set's size is 1.
Set workerGlobalScope's policy container to a clone of workerGlobalScope's owner - set[0]'s relevant settings object's policy container.
To set up a window environment settings object, given a URL - creationURL, a JavaScript execution context execution context, + creationURL, a JavaScript execution context executionContext, null or an environment reservedEnvironment, a URL - topLevelCreationURL, and an origin topLevelOrigin, run these - steps:
+ topLevelCreationURL, and an origin topLevelOrigin:Let realm be the value of execution context's Realm - component.
Let realm be executionContext's Realm component.
-Let window be realm's global - object.
This algorithm is invoked before realm's global object is allocated. The closures defined below read + the global object lazily when they are invoked, by which time the realm has been fully + wired.
+Let settings object be a new environment settings object whose @@ -97818,33 +97821,30 @@ interface BarProp {
Return execution context.
-Return executionContext.
Return the module map of
- window's associated
- Document.
Return realm's global object's
+ associated Document's module map.
Return the current base URL of window's
- associated Document.
Return realm's global object's
+ associated Document's base URL.
Return the origin of window's
- associated Document.
Return realm's global object's
+ associated Document's origin.
Let window be realm's global object.
If window's navigable's parent is null, then return false.
Return the policy container of
- window's associated
- Document.
Return the policy container of
+ realm's global object's associated Document.
Return true if both of the following hold, and false otherwise:
realm's agent cluster's cross-origin-isolation mode is "cross-origin isolation mode is "concrete", and
window's associated
- realm's global object's associated Document is allowed to use the "Document is
+ allowed to use the "cross-origin-isolated" feature.
Return window's associated
- Document's load timing info's navigation start
- time.
Return realm's global object's
+ associated Document's load
+ timing info's navigation start time.
Return Window's global names.
sharedworker"Document was in the owner set of a
- SharedWorkerGlobalScope.
+ SharedWorkerGlobalScope's relevant settings object.
User agents that support the back/forward cache for
documents using shared workers can use more specific reasons such as NotRestoredReasons {
sharedworker-message"SharedWorkerGlobalScope whose owner set contains this Document.SharedWorkerGlobalScope whose relevant settings
+ object's owner set contains this
+ Document.
sharedworker-with-no-active-client"Document was in the owner set of a
- SharedWorkerGlobalScope that is not actively
- needed.SharedWorkerGlobalScope's relevant settings object that is not
+ actively needed.
smartcardconnection"Document had an active SmartCardConnection while NotRestoredReasons {
data-x="obtain-similar-origin-window-agent">obtaining a similar-origin window agent given
origin, group, and false.
- Let realm execution context be the result of creating a new realm - given agent and the following customizations:
- -For the global object, create a new Window object.
For the global this binding, use browsingContext's
- WindowProxy object.
Let topLevelCreationURL be about:blank if embedder is
null; otherwise embedder's relevant settings object's top-level
creation URL.
Set up a window environment settings object with about:blank,
- realm execution context, null, topLevelCreationURL, and
- topLevelOrigin.
Let customizations be the following abstract closure given a + JavaScript execution context executionContext:
+ +Set up a window environment settings object with
+ about:blank, executionContext, null,
+ topLevelCreationURL, and topLevelOrigin.
Let window be a new Window object created in
+ executionContext's Realm component.
Return « window, browsingContext's WindowProxy
+ object ».
Let executionContext be the result of creating a new realm + given agent and customizations.
Let loadTimingInfo be a new document load timing info with its navigation start time set to the result of calling coarsen time @@ -112947,21 +112952,6 @@ location.href = '#foo'; browsingContext's group, and requestsOAC.
Let realmExecutionContext be the result of creating a new realm - given agent and the following customizations:
- -For the global object, create a new Window object.
For the global this binding, use browsingContext's
- WindowProxy object.
Set window to the global - object of realmExecutionContext's Realm component.
Let topLevelCreationURL be creationURL.
Let topLevelOrigin be navigationParams's
Set up a window environment settings object with creationURL, - realmExecutionContext, navigationParams's reserved environment, - topLevelCreationURL, and topLevelOrigin.
Let customizations be the following abstract closure given a + JavaScript execution context executionContext:
+ +Set up a window environment settings object with creationURL, + executionContext, navigationParams's reserved environment, + topLevelCreationURL, and topLevelOrigin.
Let newWindow be a new Window object created in
+ executionContext's Realm component.
Return « newWindow, browsingContext's WindowProxy
+ object ».
Let executionContext be the result of creating a new + realm given agent and customizations.
Set window to the global + object of executionContext's Realm component.
This is the usual case, where the new Document we're about to
@@ -113991,9 +114000,9 @@ new PaymentRequest(…); // Allowed to use
data-x="she-document-state">document state's document to null.
Remove document from the
- owner set of each WorkerGlobalScope object whose set contains document.
Remove document from the owner
+ set of each WorkerGlobalScope object's relevant settings object
+ whose set contains document.
For each workletGlobalScope in
document's worklet global
@@ -117026,6 +117035,15 @@ new PaymentRequest(…); // Allowed to use
for="environment settings object">time origin
A set of identifiers (strings), corresponding to the global
+ names of the global object's
+ interface. Used by Web IDL to determine which constructs are exposed in the realm, including during the realm's creation. 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: Perform InitializeHostDefinedRealm()
- with the provided customizations for creating the global object and the global this
- binding. Let realm execution context be the running JavaScript execution
- context. Let executionContext be MakeRealm(customizations). This is the JavaScript execution context created in the previous
- step. customizations runs at the point during realm initialization when the
+ realm record exists (with its intrinsics), but its [[GlobalObject]] is not yet set. The closure
+ is expected to set up the realm's environment settings object (writing the realm's
+ [[HostDefined]] field) and then construct the global object and global this binding,
+ returning them. Doing the environment settings object setup before global
+ allocation is necessary so that Web IDL's is exposed check
+ can be answered during global allocation: the exposure check reads the environment
+ settings object's global
+ names, secure context status, and cross-origin isolated
+ capability, none of which require the global object to exist yet. Remove realm execution context from the JavaScript execution context
- stack. Let realm be realm execution context's Realm component. Let realm be executionContext's Realm component. If agent's agent cluster's . Return realm execution context. Return executionContext. If environment is an environment settings object: Let global be environment's global object. Let globalNames be environment's global names. If global is a If globalNames contains
+ " If global's owner set[0]'s relevant settings object
- is a secure context, then return true. If environment's owner set[0]'s relevant settings
+ object is a secure context, then return true. We only need to check the 0th item since they will necessarily all be
consistent. If global is a If globalNames contains
+ " Worklets can only be created in secure contexts. provider is a provider's owner set contains
- a provider's relevant settings object's owner set contains a Any of the A A worker environment settings object has an
+ associated owner set (a set of It is a set, instead of a single owner, to accommodate
- It is a set, instead of a single owner, to accommodate shared
+ workers ( A A
-
-
WorkerGlobalScope:
+ Worker":
WorkletGlobalScope, then return true.Worklet", then return true.
Window.Document object.Document object.DedicatedWorkerGlobalScope objects in provider's
- owner set are relevant settings object's owner set are supported.WorkerGlobalScope object has an associated owner set (a
- set of Document and WorkerGlobalScope objects). It is
- initially empty and populated when the worker is created or obtained.Document
+ and WorkerGlobalScope items). It is set when the worker
+ environment settings object is set up.SharedWorkerGlobalScope objects.SharedWorkerGlobalScope).WorkerGlobalScope object has an associated type ("classic" or "WorkerGlobalScope : EventTarget {
data-x="concept-WorkerGlobalScope-module-map">module map. It is a module map,
initially empty.WorkerGlobalScope object has an associated cross-origin isolated
- capability boolean. It is initially false.
@@ -135214,13 +135236,13 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope
data-x="concept-SharedWorkerGlobalScope-extended-lifetime">extended lifetime is false,
then return false.
If global's owner set is - empty, but has been empty for less than the user agent's extended lifetime shared - worker timeout, then return true.
If global's relevant settings object's owner set + is empty, but has been empty for less than the user agent's + extended lifetime shared worker timeout, then return true.
For each owner of global's - owner set:
+ relevant settings object's owner set:For each owner of global's - owner set:
+ relevant settings object's owner set:If owner is a For each owner of global's
- owner set:Document and the amount of time that
@@ -135261,7 +135283,7 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope
If owner is a Document, and owner is fully
@@ -135305,8 +135327,8 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope
worker">permissible if the following algorithm returns true:
If global's owner set is not empty, then return true.
If global's relevant settings object's owner set is + not empty, then return true.
If global is in extended lifetime, then return true.
global is a SharedWorkerGlobalScope;
global's owner set has been empty for no more than the user agent's between-loads shared worker - timeout; and
+global's relevant settings object's owner set has + been empty for no more than the user agent's + between-loads shared worker timeout; and
the user agent has a navigable whose active document is not completely loaded,
Let globalScopeType be SharedWorkerGlobalScope if is
+ shared is true; otherwise DedicatedWorkerGlobalScope.
Let ownerSet be « owner ».
Let realm execution context be the result of creating a new realm - given agent and the following customizations:
+Let customizations be the following abstract closure given a + JavaScript execution context executionContext:
-For the global object, if is shared is true, create a new
- SharedWorkerGlobalScope object. Otherwise, create a new
- DedicatedWorkerGlobalScope object.
Let inside settings be the result of setting up a worker environment settings object with + executionContext, globalScopeType, url, outside + settings, ownerSet, and unsafeWorkerCreationTime.
Let workerScope be a new object of type globalScopeType + created in executionContext's Realm component.
Return « workerScope, null ».
Let executionContext be the result of creating a new realm + given agent and customizations.
Let worker global scope be the global - object of realm execution context's Realm component. + object
This is the DedicatedWorkerGlobalScope or
SharedWorkerGlobalScope object created in the previous step.
Set up a worker environment settings object with realm execution - context, outside settings, and unsafeWorkerCreationTime, and let - inside settings be the result.
Set worker global scope's name to options["name"].
Append owner to worker global - scope's owner set.
If is shared is true:
@@ -135573,34 +135602,6 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope settings, and response is false, then set response to a network error.Set worker global scope's cross-origin isolated
- capability to true if agent's agent cluster's cross-origin isolation mode is "concrete".
If is shared is false and owner's cross-origin isolated - capability is false, then set worker global scope's cross-origin isolated - capability to false.
If is shared is false and response's
- url's scheme is "data", then set
- worker global scope's cross-origin isolated
- capability to false.
This is a conservative default for now, while we figure out how workers in
- general, and data: URL workers in particular (which are
- cross-origin from their owner), will be treated in the context of permissions policies. See
- w3c/webappsec-permissions-policy
- issue #207 for more details.
Run processCustomFetchResponse with response and bodyBytes.
Empty - worker global scope's owner set.
To set up a worker environment settings object, given a JavaScript execution - context execution context, an environment settings object - outside settings, and a number unsafeWorkerCreationTime:
+ context executionContext, an interface globalScopeType, a + URL workerURL, an environment settings object outside + settings, a set ownerSet ofDocument and
+ WorkerGlobalScope items, and a number unsafeWorkerCreationTime:
Let realm be the value of execution context's Realm - component.
Let realm be executionContext's Realm component.
+ +This algorithm is invoked before realm's global object is allocated. The closures defined below read + the global object lazily when they are invoked, by which time the realm has been fully + wired.
+Let worker global scope be realm's global object.
Let globalNames be globalScopeType's global + names.
Let origin be a unique opaque origin if worker global scope's
- url's opaque origin if workerURL's scheme is "data"; otherwise
outside settings's origin.
Return execution context. -
Return executionContext.
Return worker global scope's module map.
+Return realm's global object's + module map.
Return worker global scope's url.
+Return realm's global object's + url.
If worker global scope's url's If workerURL's scheme is "data", then return
true.
Return worker global scope's policy container.
-Return realm's global object's + policy container.
Return worker global scope's cross-origin isolated - capability.
If realm's agent cluster's cross-origin isolation mode is not
+ "concrete", then return
+ false.
If globalNames contains
+ "DedicatedWorker":
If outside settings's cross-origin isolated + capability is false, then return false.
If workerURL's scheme is
+ "data", then return false.
Return true.
The data-URL downgrade preserves the existing conservative default for
+ data: URL workers. See w3c/webappsec-permissions-policy
+ issue #207. Using the request URL here (rather than the post-fetch response URL) is safe
+ because fetch errors on redirects to data: URLs.
Return the result of coarsening - unsafeWorkerCreationTime with worker global scope's cross-origin isolated + unsafeWorkerCreationTime with settings object's cross-origin isolated capability.
Return globalNames.
Set settings object's id to a new unique opaque string, creation URL to - worker global scope's url, top-level creation URL to null, + workerURL, top-level creation URL to null, target browsing context to null, and active service worker to null.
If worker global scope is a DedicatedWorkerGlobalScope object,
- then set settings object's top-level origin to outside
- settings's top-level origin.
Set settings object's owner set to ownerSet.
If globalNames contains
+ "DedicatedWorker", then set settings object's
+ top-level origin to outside settings's
+ top-level origin.
Otherwise, set settings object's top-level origin to an @@ -136324,7 +136362,8 @@ dictionary SharedWorkerOptions : WorkerOptionsinsidePort.
Append the relevant owner to add given - outsideSettings to workerGlobalScope's owner set.
Let workletGlobalScopeType be worklet's worklet global + scope type.
Let realmExecutionContext be the result of creating a new realm given - agent and the following customizations:
+Let customizations be the following abstract closure given a + JavaScript execution context executionContext:
-For the global object, create a new object of the type given by worklet's - worklet global scope type.
Let insideSettings be the result of setting up a worklet environment settings object + given executionContext, workletGlobalScopeType, and + outsideSettings.
Let workletScope be a new object of type workletGlobalScopeType + created in executionContext's Realm component.
Return « workletScope, null ».
Let workletGlobalScope be the global - object of realmExecutionContext's Realm component.
Let executionContext be the result of creating a new realm + given agent and customizations.
Let insideSettings be the result of setting up a worklet environment settings object given - realmExecutionContext and outsideSettings.
Let workletGlobalScope be the global + object of executionContext's Realm component.
Let pendingAddedModules be a clone of
worklet's added modules
@@ -137151,10 +137199,20 @@ interface WorkletGlobalScope {};
To set up a worklet environment settings object, given a JavaScript
- execution context executionContext and an environment settings
- object outsideSettings: Let realm be executionContext's Realm component. This algorithm is invoked before realm's global object is allocated. The closures defined below read
+ the global object lazily when they are invoked, by which time the realm has been fully
+ wired. Let origin be a unique opaque
origin. Let realm be the value of executionContext's Realm
- component. Let workletGlobalScope be realm's global object. Let globalNames be workletGlobalScopeType's global
+ names. Let settingsObject be a new environment settings object whose
@@ -137177,14 +137232,12 @@ interface WorkletGlobalScope {};
Return executionContext. Return executionContext. Return workletGlobalScope's module map. Return realm's global object's
+ module map. Assert: this algorithm is never called, because the time origin is not available in a worklet
context. Return globalNames.
+