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

hasStorageAccess() deals with promises in parallel #151

Closed
domfarolino opened this issue Dec 23, 2022 · 2 comments
Closed

hasStorageAccess() deals with promises in parallel #151

domfarolino opened this issue Dec 23, 2022 · 2 comments

Comments

@domfarolino
Copy link

While in parallel, the hasStorageAccess() algorithm creates a promise and fulfills it in-parallel, which is an invalid usage of the Promise API.

More generally, I don't really understand the flow of that algorithm. The method itself returns a promise and then right when it goes in parallel it creates another promise which becomes the resolved value of the outer promise? It seems like we should just pass in the first promise (that was properly created on the main thread) into the https://privacycg.github.io/storage-access/#determine-the-storage-access-policy algorithm, which would then resolve/reject it accordingly.

@cfredric
Copy link
Contributor

Worth noting that both of those issues will be fixed in my PR (#141).

@annevk
Copy link
Collaborator

annevk commented Jun 29, 2023

This has indeed been resolved, although we might move back to using in parallel in #174 (but without this issue).

@annevk annevk closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants