diff --git a/source b/source index f339b6c57e5..f454a1fd8a8 100644 --- a/source +++ b/source @@ -2401,7 +2401,9 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute getting the value of an entry, and setting the value of an entry
  • The list data structure and the associated definitions for - append, and + append, + remove, + empty, contains, size, is empty, and @@ -2409,7 +2411,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
  • The stack data structure and the associated definitions for push and pop
  • -
  • The ordered set data structure
  • +
  • The ordered set data structure and the associated definition for + append
  • HTML namespace
  • MathML namespace
  • SVG namespace
  • @@ -79148,8 +79151,8 @@ callback FrameRequestCallback = void (DOMHighResTimeStamp

    Whenever a Document object is discarded, it is also removed from the list of the worker's - Documents of each worker whose list contains that Document.

    + Document">discarded, it is also removed from the owner set of each worker + whose set contains that Document.

    When a browsing context is discarded, the strong reference from the user agent itself to the browsing context must be severed, and all the @@ -96884,6 +96887,19 @@ interface WorkerGlobalScope : EventTarget { attribute EventHandler onunhandledrejection; }; +

    A 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.

    + +

    It is a set, instead of a single owner, to accomodate + SharedWorkerGlobalScope objects.

    + +

    A WorkerGlobalScope object has an associated worker set (a set of + WorkerGlobalScope objects). It is initially empty and populated when the worker + creates or obtains further workers.

    +

    A WorkerGlobalScope object has an associated type ("classic" or "module"). It is set during creation. @@ -97127,63 +97143,48 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope { contexts through message channels and their MessagePort objects.

    -

    Each WorkerGlobalScope worker global scope has a list of +

    Each WorkerGlobalScope object worker global scope has a list of the worker's ports, which consists of all the MessagePort objects that are entangled with another port and that have one (but only one) port owned by - worker global scope. This list includes the implicit MessagePort in the case of dedicated workers.

    - -

    Each WorkerGlobalScope also has a list of the worker's - workers. Initially this list is empty; it is populated when the worker creates or obtains - further workers.

    - -

    Finally, each WorkerGlobalScope also has a list of the - worker's Documents. Initially this list is empty; it is populated when the - worker is created.

    - -

    Whenever a Document d is added to the worker's Documents, the user agent must, for - each worker q in the list of the worker's workers whose list of - the worker's Documents does not contain d, add d to q's WorkerGlobalScope owner's list of the worker's - Documents.

    + worker global scope. This list includes the implicit MessagePort in the + case of dedicated workers.

    Whenever a Document object is discarded, - it must be removed from the list of the worker's Documents of each - worker whose list contains that Document.

    - -

    Given an environment settings object o when creating or obtaining a - worker, the list of relevant Document objects to add depends on the type - of global object specified by o. - If o specifies a global object - that is a WorkerGlobalScope object (i.e. if we are creating a nested worker), then - the relevant Documents are the the worker's Documents of - the global object specified by o. - Otherwise, o specifies a global - object that is a Window object, and the relevant Document is just - the responsible document specified by o.

    + it must be removed from the owner set of each + WorkerGlobalScope object whose set contains that + Document object.

    + +

    Given an environment settings object + o when creating or obtaining a worker, the relevant owner to add depends on + the type of global object specified by + o. If o specifies a global + object that is a WorkerGlobalScope object (i.e., if we are creating a nested + worker), then the relevant owner is that global object. Otherwise, o specifies a global object that is a Window object, + and the relevant owner is the responsible document specified by o.


    -

    A worker is said to be a permissible worker if its list of the worker's - Documents is not empty, or if its list has been empty for no more than a short - user-agent-defined timeout value, its WorkerGlobalScope is actually a - SharedWorkerGlobalScope object (i.e. the worker is a shared worker), and the user - agent has a browsing context whose Document is not completely - loaded.

    +

    A worker is said to be a permissible worker if its WorkerGlobalScope's + owner set is not empty or:

    + +

    The second part of this definition allows a shared worker to survive for a short time while a page is loading, in case that page is going to contact the shared worker again. This can be used by user agents as a way to avoid the cost of restarting a shared worker used by a site when the user is navigating from page to page within that site.

    -

    A worker is said to be an active needed worker if any of the Document - objects in the worker's Documents are fully active.

    +

    A worker is said to be an active needed worker if any its owners are either Document objects that are fully active or + active needed workers.

    A worker is said to be a protected worker if it is an active needed worker and either it has outstanding timers, database transactions, or network connections, @@ -97219,15 +97220,13 @@ interface SharedWorkerGlobalScope : WorkerGlobalScope {

  • Let is shared be true if worker is a SharedWorker object, and false otherwise.

  • -
  • Let docs be the list of relevant Document objects to - add given outside settings.

  • +
  • Let owner be the relevant owner to add given outside + settings.

  • Let parent worker global scope be null.

    -
  • If outside settings's global - object is a WorkerGlobalScope object (i.e. we are creating a nested worker), - set parent worker global scope to outside settings's global object.

  • +
  • If owner is a WorkerGlobalScope object (i.e., we are creating a + nested worker), then set parent worker global scope to owner.

  • Call the JavaScript SharedWorkerGlobalScope : WorkerGlobalScope {

  • Entangle outside port and inside port.

  • -
  • Add to worker global - scope's list of the worker's Documents the - Document objects in docs.

  • +
  • Append owner to worker global + scope's owner set.

  • -
  • If parent worker global scope is not null, add worker global scope - to the list of the worker's workers of parent worker global - scope.

  • +
  • If parent worker global scope is not null, then append worker global scope to parent worker global scope's + worker set.

  • Set worker global scope's type to the value of the SharedWorkerGlobalScope : WorkerGlobalScope {

  • Empty the worker's list of - the worker's Documents.

    + doesn't have to survive until its Documents all die off too -->

    Empty worker global scope's owner set.

  • @@ -97811,9 +97809,6 @@ enum WorkerType { "classic", "module" };
  • Associate the outside port with worker.

  • -
  • Let docs be the list of relevant Document objects to - add given outside settings.

  • -
  • Return worker, and run the following step in parallel.

  • Run a worker given worker, worker URL, outside @@ -97962,15 +97957,15 @@ interface SharedWorker : EventTarget { data-x="dom-MessageEvent-source">source attribute initialized to inside port.

  • -
  • Add to worker global - scope's list of the worker's Documents the - list of relevant Document objects to add given outside - settings.

  • +
  • Append the relevant owner to add given + outside settings to worker global scope's owner + set.

  • If outside settings's global - object is a WorkerGlobalScope object, add worker global scope - to the list of the worker's workers of outside settings's global object.

  • + object is a WorkerGlobalScope object, then append worker global scope to outside settings's global object's worker + set.