Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is there a responsible browsing context, but no document? #224

Closed
annevk opened this issue Jun 22, 2016 · 5 comments
Closed

Why is there a responsible browsing context, but no document? #224

annevk opened this issue Jun 22, 2016 · 5 comments

Comments

@annevk
Copy link
Member

annevk commented Jun 22, 2016

If the document goes away, the worklet will too, no? It's hardly ever useful to have a handle on a browsing context...

@bzbarsky

@bfgeek
Copy link
Contributor

bfgeek commented Apr 14, 2017

@annevk I looked back at the old revision of the spec* and was trying to work out was this was referring to...

....was this just referring to the fact we didn't have a defined lifetime yet? I.e. does #389 fix this?

@annevk
Copy link
Member Author

annevk commented Apr 14, 2017

That sounds like a slot on the other side, which presumably already exists since that's the document/Window holding the worklet.

@annevk
Copy link
Member Author

annevk commented Apr 14, 2017

This blocks whatwg/html#2521 although it seems @domenic is okay with leaving it as an open issue.

annevk added a commit to whatwg/html that referenced this issue Apr 16, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

shaky foundation. Because of that, similar-origin window agents are
the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of #2260. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
annevk added a commit to whatwg/html that referenced this issue Apr 19, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

shaky foundation. Because of that, similar-origin window agents are
the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of #2260. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
annevk added a commit to whatwg/html that referenced this issue Apr 25, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

Tests: web-platform-tests/wpt#5569.

Follow-up to define similar-origin window agents upon a less shaky
foundation is #2528. Because of that, similar-origin window agents
are the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of #2260. Fixes #851. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
annevk added a commit to whatwg/html that referenced this issue Apr 26, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

Tests: web-platform-tests/wpt#5569.

Follow-up to define similar-origin window agents upon a less shaky
foundation is #2528. Because of that, similar-origin window agents
are the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

Follow-up for better agent shutdown notifications: #2581.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of #2260. Fixes #851. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
inikulin pushed a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

Tests: web-platform-tests/wpt#5569.

Follow-up to define similar-origin window agents upon a less shaky
foundation is whatwg#2528. Because of that, similar-origin window agents
are the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

Follow-up for better agent shutdown notifications: whatwg#2581.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of whatwg#2260. Fixes whatwg#851. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
inikulin pushed a commit to HTMLParseErrorWG/html that referenced this issue May 9, 2017
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

Tests: web-platform-tests/wpt#5569.

Follow-up to define similar-origin window agents upon a less shaky
foundation is whatwg#2528. Because of that, similar-origin window agents
are the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

Follow-up for better agent shutdown notifications: whatwg#2581.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of whatwg#2260. Fixes whatwg#851. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
@bfgeek
Copy link
Contributor

bfgeek commented Sep 25, 2017

There is now a concept called the owner document in the spec:
https://drafts.css-houdini.org/worklets/#workletglobalscope-owner-document

The global scope is destroyed when the document is discarded, similar to workers.

alice pushed a commit to alice/html that referenced this issue Jan 8, 2019
Define the infrastructure for SharedArrayBuffer. This also clarifies
along which boundaries a browser implementation can use processes and
threads.

Tests: web-platform-tests/wpt#5569.

Follow-up to define similar-origin window agents upon a less shaky
foundation is whatwg#2528. Because of that, similar-origin window agents
are the best place to store state that would formerly go on unit of
related similar-origin browsing contexts.

Follow-up for better agent shutdown notifications: whatwg#2581.

tc39/ecma262#882 is follow-up to define
agents in more detail; in particular make their implicit realms slot
explicit. w3c/css-houdini-drafts#224 is
follow-up to define worklet ownership better which is needed to
define how they relate to agent (sub)clusters.

Fixes part of whatwg#2260. Fixes whatwg#851. Fixes
w3c/ServiceWorker#1115. Fixes most of
w3c/css-houdini-drafts#380 (no tests and no
nice grouping of multiple realms in a single agent as that is not
needed).
domenic added a commit to whatwg/html that referenced this issue Oct 16, 2020
Closes w3c/css-houdini-drafts#1000.

This provides a baseline by porting over all the existing text from
https://drafts.css-houdini.org/worklets/, modernizing and restructuring
it along the way. It does not yet fix many of the open logged issues
(although it does fix some; see below).

Notable changes from that document:

* Rearranged sections to better match workers, and my sense of flow.

* Moved worklet script fetching to be siblings with all the other script
  fetching algorithms.

* Improved clarity and guidance on what specifications that define
  worklets should do, including fleshing out the fake worklet example.

* Changed "create a WorkletGlobalScope", which took one set of
  arguments, to "create a worklet global scope", which just takes a
  Worklet instance. This appears to match better how the algorithm is
  used, e.g. in
  https://drafts.css-houdini.org/css-paint-api/#draw-a-paint-image step
  10.

* Updated "report an error" to bail out for non-EventTarget globals,
  like WorkletGlobalScope. Closes #2611.

* Updated worklets to only be exposed in secure contexts. Closes
  w3c/css-houdini-drafts#505.

* Makes the lifetime of creating and terminating WorkletGlobalScopes
  more explicit. Closes
  w3c/css-houdini-drafts#224. Closes
  w3c/css-houdini-drafts#389.

* Explicitly start and stop the event loop for a given
  WorkletGlobalScope upon creation/termination. Closes
  w3c/css-houdini-drafts#843.
  Closes w3c/css-houdini-drafts#318 for real.

* Fixes creation of new worklet global scopes to only run the top-level
  module scripts added via addModule(), which will automatically run
  their dependencies. Previously it would run all module scripts loaded
  into the worklet, so dependencies would be run in the order they were
  fetched, not as part of the top-down module evaluation process. Closes
  w3c/css-houdini-drafts#264.
@domenic
Copy link
Contributor

domenic commented Oct 16, 2020

With whatwg/html#6056, we can close this. The lifetime of WorkletGlobalScopes is now very explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants