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.
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.