From 05a6622ba5ebce3b97e87e21bf984660b6f4d13b Mon Sep 17 00:00:00 2001
From: Dominic Farolino The next complication is that, in algorithm sections that are in parallel, you
must not create or manipulate objects associated to a specific realm, global, or environment settings object. (Stated in more
- familiar terms, you must not directly access main-thread artifacts from a background thread.)
- Doing so would create data races observable to JavaScript code, since after all, your algorithm
- steps are running in parallel to the JavaScript code.
You can, however, manipulate specification-level data structures and values from
Infra, as those are realm-agnostic. They are never directly exposed to JavaScript without
From 1a7990daaa88cae3f355d47c97d05c797131ddb3 Mon Sep 17 00:00:00 2001
From: Dominic Farolino Let result be a new promise object. Let offscreenCanvas be this. Run these steps in parallel: Queue a global task on the canvas blob serialization task source
- given this's relevant global object to run these steps:
If file is null, then reject result with an
"EncodingError" DOMException.
Otherwise, resolve result with a new Blob object, created in
- this's relevant realm, representing
- file. FILEAPI
Let p be a new promise created in this's relevant realm.
Let global be this's relevant global + object.
Run the following steps in parallel:
If nameList contains name,
then queue a global task on the DOM manipulation task source given
- this's relevant global object to reject p with a
- TypeError, and abort these steps.
TypeError, and abort these
+ steps.Do some potentially lengthy work.
Queue a global task on the DOM manipulation task source - given this's relevant global object to resolve p with - undefined.
Let p be a new promise created in this's relevant realm.
Let global be this's relevant global + object.
Enqueue the following steps to nameListQueue:
If nameList contains name,
then queue a global task on the DOM manipulation task source given
- this's relevant global object to reject p with a
- TypeError, and abort these steps.
TypeError, and abort these
+ steps.Do some potentially lengthy work.
Queue a global task on the DOM manipulation task source - given this's relevant global object to resolve p with - undefined.
Let promise be a new promise.
Let workletInstance be this.
Run the following steps in parallel:
If this's global scopes - is empty, then:
+If workletInstance's global + scopes is empty, then:
Create a worklet global scope given this.
Create a worklet global scope given workletInstance.
Optionally, create additional - global scope instances given this, depending on the specific worklet in question - and its specification.
Wait for all steps of the creation process(es) — including those taking place within the worklet @@ -123981,7 +123983,7 @@ dictionary WorkletOptions {
Let pendingTasks be this's Let pendingTasks be workletInstance's global scopes's size.
For each workletGlobalScope of
- this's global scopes,
- queue a global task on the networking task source given
- workletGlobalScope to fetch a worklet script graph given
- moduleURLRecord, outsideSettings, this's worklet
- destination type, options["workletInstance's global
+ scopes, queue a global task on the networking task source
+ given workletGlobalScope to fetch a worklet script graph given
+ moduleURLRecord, outsideSettings, workletInstance's
+ worklet destination type, options["credentials"], workletGlobalScope's
- relevant settings object, this's relevant settings object, workletInstance's module responses map, and the following
steps given script:
Only the first of these fetches will actually perform a network request; the
ones for other WorkletGlobalScopes will reuse responses from this's responses from workletInstance's module responses map.
Queue a global task on the networking task source given - this's relevant global object to perform the following + workletInstance's relevant global object to perform the following steps:
Queue a global task on the networking task source given - this's relevant global object to perform the following + workletInstance's relevant global object to perform the following steps:
Append moduleURLRecord to - this's added modules - list.
Set addedSuccessfully to true.
Queue a global task on the - networking task source given this's relevant global + networking task source given workletInstance's relevant global object to perform the following steps:
Append name to nameList.
Queue a global task on the DOM manipulation task source - given global to resolve p with undefined.
Queue a global task on the DOM manipulation task source given + global to resolve p with undefined.
Append name to nameList.
Queue a global task on the DOM manipulation task source - given global to resolve p with undefined.
Queue a global task on the DOM manipulation task source given + global to resolve p with undefined.
Run a module script given script.
Queue a global task on the - networking task source given workletInstance's relevant global - object to perform the following steps:
+Queue a global task on the networking task source given + workletInstance's relevant global object to perform the following + steps:
Let result be a new promise object.
Let offscreenCanvas be this.
Let global be this's relevant global object.
Run these steps in parallel:
@@ -72177,15 +72177,15 @@ interface OffscreenCanvas : EventTarget {Queue a global task on the canvas blob serialization task source - given offscreenCanvas's relevant global object to run these steps:
+ given global to run these steps:The next complication is that, in algorithm sections that are in parallel, you must not create or manipulate objects associated to a specific realm, global, or environment settings object. By extension, - you cannot access Web IDL's this value from steps running in parallel, - even if those steps were activated by an algorithm that does have access to the - this value. (Stated in more familiar terms, you must not directly access main-thread - artifacts from a background thread.) Doing so would create data races observable to JavaScript - code, since after all, your algorithm steps are running in parallel to the - JavaScript code.
+ data-x="global object">global, or environment settings object. (Stated in more + familiar terms, you must not directly access main-thread artifacts from a background thread.) + Doing so would create data races observable to JavaScript code, since after all, your algorithm + steps are running in parallel to the JavaScript code. + +By extension, you cannot access Web IDL's this value from steps running in + parallel, even if those steps were activated by an algorithm that does have access + to the this value.
You can, however, manipulate specification-level data structures and values from Infra, as those are realm-agnostic. They are never directly exposed to JavaScript without