-
Notifications
You must be signed in to change notification settings - Fork 320
Update agent and realm allocation #1508
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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: | ||
| 1. Let |realmExecutionContext| be the result of [=create a new JavaScript realm|creating a new JavaScript realm=] given |agent| and the following customizations: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here |
||
| * For the global object, create a new {{ServiceWorkerGlobalScope}} object. Let |workerGlobalScope| be the created object. | ||
| * Let |realmExecutionContext| be the created [=execution context|JavaScript execution context=]. | ||
| 1. Set |serviceWorker|'s [=service worker/global object=] to |workerGlobalScope|. | ||
| 1. Let |workerEventLoop| be a newly created <a>event loop</a>. | ||
| 1. Let |settingsObject| be a new <a>environment settings object</a> whose algorithms are defined as follows: | ||
|
|
||
| : The [=environment settings object/realm execution context=] | ||
| :: Return |realmExecutionContext|. | ||
| : The [=environment settings object/global object=] | ||
| :: Return |workerGlobalScope|. | ||
| : The <a>responsible event loop</a> | ||
| :: Return |workerEventLoop|. | ||
| : The [=environment settings object/referrer policy=] | ||
| :: Return |workerGlobalScope|'s [=WorkerGlobalScope/referrer policy=]. | ||
| : The [=environment settings object/module map=] | ||
| :: Return |workerGlobalScope|'s [=WorkerGlobalScope/module map=]. | ||
| : The <a>API URL character encoding</a> | ||
| :: Return UTF-8. | ||
| :: Return [=UTF-8=]. | ||
| : The <a>API base URL</a> | ||
| :: Return |serviceWorker|'s [=service worker/script url=]. | ||
| : The [=environment settings object/origin=] | ||
| :: Return its registering [=/service worker client=]'s [=environment settings object/origin=]. | ||
| : The <a>creation URL</a> | ||
| :: Return |workerGlobalScope|'s [=WorkerGlobalScope/url=]. | ||
| : The [=environment settings object/HTTPS state=] | ||
| :: Return |workerGlobalScope|'s [=WorkerGlobalScope/HTTPS state=]. | ||
| : The [=environment settings object/referrer policy=] | ||
| :: Return |workerGlobalScope|'s [=WorkerGlobalScope/referrer policy=]. | ||
|
|
||
| 1. Set |settingsObject|'s [=environment/id=] to a new unique opaque string, its [=creation URL=] to |serviceWorker|'s [=service worker/script url=], its [=environment/target browsing context=] to null, and its [=active service worker=] to null. | ||
| 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/url=] to |serviceWorker|'s [=service worker/script url=]. | ||
| 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/HTTPS state=] to |serviceWorker|'s <a>script resource</a>'s <a>HTTPS state</a>. | ||
| 1. Set |workerGlobalScope|'s [=WorkerGlobalScope/referrer policy=] to |serviceWorker|'s <a>script resource</a>'s [=script resource/referrer policy=]. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.