Skip to content

Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show()#30023

Merged
marcoscaceres merged 1 commit intomasterfrom
stephenmcgruer-patch-1
Aug 13, 2021
Merged

Fix some NotAllowedError --> SecurityError cases for PaymentRequest.show()#30023
marcoscaceres merged 1 commit intomasterfrom
stephenmcgruer-patch-1

Conversation

@stephenmcgruer
Copy link
Contributor

@stephenmcgruer
Copy link
Contributor Author

Based on the results for both Chrome + Safari for the Throws if the promise [[state]] is not 'created'. sub-test, I suspect that neither follow the spec in checking user activation before step 7 (If request.[[state]] is not "created").

At least for Chrome, reading our code, we do the first set of checks in this order I believe:

    1. If document is not fully active, then return a promise rejected with an "AbortError" DOMException.
    1. If request.[[state]] is not "created" then return a promise rejected with an "InvalidStateError" DOMException.
    1. If the relevant global object of request does not have transient activation, return a promise rejected with with a "NotAllowedError" DOMException.

I can't quite find if or when we do the check in step 6 yet :D. (It is optional).

@marcoscaceres marcoscaceres merged commit ee2d179 into master Aug 13, 2021
@marcoscaceres marcoscaceres deleted the stephenmcgruer-patch-1 branch August 13, 2021 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants