From 1c418896a8ffe217169362628568dbeecf03ae6d Mon Sep 17 00:00:00 2001 From: Ian Kilpatrick Date: Wed, 30 Aug 2017 13:18:43 -0700 Subject: [PATCH 1/3] [worklets] Add initialization of CSP list. --- worklets/Overview.bs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/worklets/Overview.bs b/worklets/Overview.bs index 06c4d17b..28ec2502 100644 --- a/worklets/Overview.bs +++ b/worklets/Overview.bs @@ -29,6 +29,7 @@ Editor: Ian Kilpatrick, ikilpatrick@chromium.org +Each {{WorkletGlobalScope}} has an assocated owner document. It is +initially null and set inside the create a WorkletGlobalScope algorithm. + +Whenever a {{Document}} object is discarded, each {{WorkletGlobalScope}} whose owner +document is that {{Document}} object should clear its owner document. + Each {{WorkletGlobalScope}} has an associated environment settings object. Each {{WorkletGlobalScope}} has an associated module map. It is a @@ -194,7 +204,12 @@ When a user agent is to create a WorkletGlobalScope, given |workletGl 4. Associate the |insideSettings| with |workletGlobalScope|. - 5. For each |entry| in the given |moduleResponsesMap| (in insertion order), run the following + 5. Set |workletGlobalScope|'s owner document to |outsideSettings|'s responsible + document. + + 6. Invoke the initialize a global object's CSP list algorithm given |workletGlobalScope|. + + 7. For each |entry| in the given |moduleResponsesMap| (in insertion order), run the following substeps: 1. Let |moduleURLRecord| be |entry|'s key. From dff6c833beb73664d5ceee443cdddfe25a7e5f68 Mon Sep 17 00:00:00 2001 From: Ian Kilpatrick Date: Fri, 1 Sep 2017 09:49:45 -0700 Subject: [PATCH 2/3] Update Overview.bs --- worklets/Overview.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worklets/Overview.bs b/worklets/Overview.bs index 28ec2502..5811d55e 100644 --- a/worklets/Overview.bs +++ b/worklets/Overview.bs @@ -142,7 +142,7 @@ Each {{WorkletGlobalScope}} has an assocated owner d initially null and set inside the create a WorkletGlobalScope algorithm. Whenever a {{Document}} object is discarded, each {{WorkletGlobalScope}} whose owner -document is that {{Document}} object should clear its owner document. +document is that {{Document}} object, should clear its owner document. Each {{WorkletGlobalScope}} has an associated environment settings object. From bf90a9e889a924b28783058feb4bc16fa3b50cec Mon Sep 17 00:00:00 2001 From: Ian Kilpatrick Date: Mon, 25 Sep 2017 14:27:23 +0900 Subject: [PATCH 3/3] [worklets] Language for non-derminism. --- css-paint-api/Overview.bs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/css-paint-api/Overview.bs b/css-paint-api/Overview.bs index 0d1dad55..6a7c422b 100644 --- a/css-paint-api/Overview.bs +++ b/css-paint-api/Overview.bs @@ -553,6 +553,14 @@ following steps: in the worklet's WorkletGlobalScopes list, unless the user agent is under memory constraints. +
+ User-agents have to attempt to introduce some non-determinism in the selection process + above. For example they could: + - Each frame select a random global scope from the list. + - After invocation(s) of draw a paint image randomly choose to switch to a + different global scope. +
+ Note: This is to ensure that authors do not rely on being able to store state on the global object or non-regeneratable state on the class.