diff --git a/source b/source index f454a1fd8a8..b7d12fbc127 100644 --- a/source +++ b/source @@ -2855,6 +2855,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
Date
classSharedArrayBuffer
classTypeError
classRangeError
classtypeof
operatorJavaScript defines the concept of an agent. This corresponds, in a 1-to-1 manner, + with this specification's concept of an environment settings object.
+ +See also tc39/ecma262 + issue #882.
+ +To determine the manifestation of JavaScript's agent cluster concept in user + agents, we first define the set of directly-shared environment settings objects for a + given environment settings object settingsObject:
+ +The set containing:
+ +DedicatedWorkerGlobalScope
object of which the worker's owners
+ contains settingsObject's responsible document.DedicatedWorkerGlobalScope
objectThe set containing: + +
SharedWorkerGlobalScope
objects.The set containing settingsObject and any relevant settings object
+ of settingsObject's global
+ object's the worker's workers that are not
+ SharedWorkerGlobalScope
objects.
What to do with worklets?
+ +Then, the transitive closure of all environment + settings objects that are directly-shared environment settings objects are the + shared environment settings objects, and a JavaScript agent cluster + consists of all the corresponding agents.
+ +The agent cluster concept is crucial for defining the JavaScript
+ memory model, and in particular among which agents the backing data of
+ SharedArrayBuffer
objects can be shared.
The following pairs of global objects are each within the same shared environment
+ settings objects, and thus can use SharedArrayBuffer
instances to share
+ memory with each other:
Window
and a dedicated worker that it createdWindow
and the Window
of an iframe
element that
+ could be same origin-domainWindow
and the Window
that opened itThe following pairs of global objects are not within the same shared + environment settings objects, and thus cannot share memory:
+ +Window
and a shared worker it createsWindow
and a service worker it createsWindow
and the Window
of an iframe
element that
+ cannot be same origin-domain