-
Notifications
You must be signed in to change notification settings - Fork 315
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
Update agent and realm allocation #1508
Conversation
docs/index.bs
Outdated
1. Set |serviceWorker|'s [=service worker/global object=] to |workerGlobalScope|. | ||
1. Let |workerEventLoop| be a newly created <a>event loop</a>. | ||
1. Let |workerEventLoop| be |agent|'s [=event loop=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does an agent have an associated event loop?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Yes, as of whatwg/html@cd59059, but we did not add a dedicated definition for it. I'm on the fence as to whether we should or not... any thoughts, @annevk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice, but I'd be okay with a cleanup issue of sorts. (I'm suddenly reminded of document's origin.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might as well do it now, if we're asking related specs to make changes.
@@ -2853,33 +2853,28 @@ spec: webappsec-referrer-policy; urlPrefix: https://w3c.github.io/webappsec-refe | |||
1. Let |script| be |serviceWorker|'s [=service worker/script resource=]. | |||
1. Assert: |script| is not null. | |||
1. Let |startFailed| be false. | |||
1. Create a separate parallel execution environment (i.e. a separate thread or process or equivalent construct), and run the following steps in that context: | |||
1. Call the JavaScript [=InitializeHostDefinedRealm|InitializeHostDefinedRealm()=] abstract operation with the following customizations: | |||
1. Let |agent| be the result of [=obtain a service worker agent|obtaining a service worker agent=], and run the following steps in that context: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: It's be great to add "obtaining a service worker agent" as link text.
1. Create a separate parallel execution environment (i.e. a separate thread or process or equivalent construct), and run the following steps in that context: | ||
1. Call the JavaScript [=InitializeHostDefinedRealm|InitializeHostDefinedRealm()=] abstract operation with the following customizations: | ||
1. Let |agent| be the result of [=obtain a service worker agent|obtaining a service worker agent=], and run the following steps in that context: | ||
1. Let |realmExecutionContext| be the result of [=create a new JavaScript realm|creating a new JavaScript realm=] given |agent| and the following customizations: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
OK, the HTML changes have landed and percolated, and I've confirmed they're working correctly in the PR preview. This is ready for an editor to merge. |
Follows whatwg/html#5411.
This moves to the imperative style of agent allocation, as HTML is no longer declaratively defining service worker agents and their relations to others.
Preview | Diff