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

[shared storage] Support cross-origin worklet #44596

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Feb 14, 2024

For the sharedStorage.createWorklet() API, relax the same-origin
restriction to additionally allow cross-origin script, in which case
a cross-origin worklet will be created.

How:

  • Rely on CORS for the worklet to be created/used by the embedder.
  • In general, we want to mimic the subframe's process allocation
    behavior (i.e. it should end up using a process as if an iframe is
    created with the script URL). It leverages the process allocation
    and management logic from service workers and re-use SiteInstanceImpl::CreateForServiceWorker(). To keep this
    CL focused, the refactoring will occur in a separate CL, as it
    will involve refactoring other downstream components like
    'UnmatchedServiceWorkerProcessTracker'.

Explainer: WICG/shared-storage#130
Spec: WICG/shared-storage#131
Design doc:
https://docs.google.com/document/d/1QTaaroCMeFVZVghI6JkUcDvmDQEacjvpyTfk6mpvQhA/edit?usp=sharing

Bug: 325302836
Change-Id: I11c1fc87bc76f4400c54d9fa809349d1d1781247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5296843
Reviewed-by: Alex Moshchuk <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1265583}

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-5296843 branch 10 times, most recently from 19c5098 to 3c782b8 Compare February 15, 2024 23:11
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-5296843 branch 4 times, most recently from e40ffc4 to 8b6900d Compare February 27, 2024 00:41
@chromium-wpt-export-bot chromium-wpt-export-bot marked this pull request as ready for review February 27, 2024 02:00
For the sharedStorage.createWorklet() API, relax the same-origin
restriction to additionally allow cross-origin script, in which case
a cross-origin worklet will be created.

How:
- Rely on CORS for the worklet to be created/used by the embedder.
- In general, we want to mimic the subframe's process allocation
behavior (i.e. it should end up using a process as if an iframe is
created with the script URL). It leverages the process allocation
and management logic from service workers and re-use SiteInstanceImpl::CreateForServiceWorker(). To keep this
CL focused, the refactoring will occur in a separate CL, as it
will involve refactoring other downstream components like
'UnmatchedServiceWorkerProcessTracker'.

Explainer: WICG/shared-storage#130
Spec: WICG/shared-storage#131
Design doc:
https://docs.google.com/document/d/1QTaaroCMeFVZVghI6JkUcDvmDQEacjvpyTfk6mpvQhA/edit?usp=sharing

Bug: 325302836
Change-Id: I11c1fc87bc76f4400c54d9fa809349d1d1781247
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5296843
Reviewed-by: Alex Moshchuk <[email protected]>
Commit-Queue: Yao Xiao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1265583}
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot merged commit e8e7749 into master Feb 27, 2024
10 of 14 checks passed
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-5296843 branch February 27, 2024 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants