Skip to content

merge_pr_46464

Compare
Choose a tag to compare
@github-actions github-actions released this 23 May 23:46

[shared storage] Move the opaque origin check to each SharedStorage method

Currently, we throw an error when accessing window.sharedStorage in an
opaque origin context. This deviates from the specification, which
specifies to throw an error for opaque origins within each method.

We fix the code to align with the specification. The validation
at mojom boundary is also moved to each method. This requires
SharedStorageWorkletDevToolsAgentHostTest to update the page
origin to https scheme.

This also begins to address the ambiguity around whether
sharedStorage.createWorklet(url) should be permitted in opaque origin
contexts. By relocating the check, we create flexibility for
potential future relaxation of these constraints.

Bug: 342197901
Change-Id: Ie1583b341148681be202eeae39810cbfac546de9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5560723
Reviewed-by: Andrey Kosyakov caseq@chromium.org
Commit-Queue: Yao Xiao yaoxia@chromium.org
Reviewed-by: Cammie Smith Barnes cammie@chromium.org
Cr-Commit-Position: refs/heads/main@{#1305355}