Replace origin with storage key for BroadcastChannel partitioning #7567
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.
This PR updates the BroadcastChannel portion of the HTML standard to have storage keys be used instead of origins when determining which browsing contexts should be able to have BroadcastChannel messages sent and received between them. Today, a storage key only consists of an origin, but it will (likely soon) include the top-level origin as well. Only using origin enables certain forms of cross-site tracking. For more details, see: https://privacycg.github.io/storage-partitioning/
This is related to #5803 (and will ultimately fix it once the Storage spec is updated to add top-level origin into Storage Key). Also, using Storage Key here instead of origin + top-level origin should make the standard more uniform across the storage APIs and messaging APIs that use this as a partition key (related: w3c/web-locks#74)
This is currently a WIP because it's blocked on: whatwg/storage#131(addressed by whatwg/storage#132)Also, the storage standard doesn't define a storage key comparison algorithm, so I'm just using 'equals' here. Is that sufficient or should we pursue adding a comparison algorithm to use?(addressed by whatwg/storage#134)I will fill in all of the values below when making this PR no longer a WIP:
(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/web-messaging.html ( diff )