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

Replace Origin references with Storage Key #74

Closed
inexorabletash opened this issue Aug 12, 2021 · 6 comments · Fixed by #75
Closed

Replace Origin references with Storage Key #74

inexorabletash opened this issue Aug 12, 2021 · 6 comments · Fixed by #75

Comments

@inexorabletash
Copy link
Member

https://storage.spec.whatwg.org/#storage-keys

@inexorabletash
Copy link
Member Author

On further thought, passing storage keys around doesn't make as much sense as acquiring the shelf/bucket/bottle directly.

@smaug----
Copy link

Curious, what is the reasoning here? Doesn't this possibly limit Web Locks to be used with storage stuff only?

@inexorabletash
Copy link
Member Author

It's ~always been the case that locks needed to have the same privacy characteristics as storage and APIs like BroadcastChannel. That is, if third party storage is partitioned, locks and channels are partitioned the same way. There didn't used to be a way to specify this, so the spec primarily used "origin" and then had a note in prose that it should match the partitioning behavior of storage. Now that these are defined in Storage, this can be made explicit.

I can't find the detailed discussions at the moment, but some previous issues.

#15
#45

Anyway, this shouldn't be a behavior change, just specifying the existing behavior.

@smaug----
Copy link

ok. Though BroadcastChannel uses origin (per spec at least), which is why I wondered why this change.

@inexorabletash
Copy link
Member Author

BroadcastChannel should update too. I'll follow up about a bug. Note that currently a StorageKey is defined as an origin so there's no normative behavior difference until that changes.

@inexorabletash
Copy link
Member Author

whatwg/html#5803 I guess serves as this.

inexorabletash pushed a commit that referenced this issue Nov 12, 2021
Replace lock set and request queue associations with an origin with a lock manager instead.

This doesn't change normative behavior, just moves conceptual ownership off the origin. This paves the way for future work towards #74 to enable partitioning, and coincidentally matches implementations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants