KEMBAR78
Remove requirement to reject after document is inactive by danyao · Pull Request #875 · w3c/payment-request · GitHub
Skip to content

Conversation

danyao
Copy link
Collaborator

@danyao danyao commented Jul 18, 2019

closes #872

The following tasks have been completed:

Implementation commitment:

Optional, impact on Payment Handler spec? N/A


Preview | Diff

@danyao danyao requested review from domenic and marcoscaceres July 18, 2019 23:18
Copy link
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋😢

@danyao danyao merged commit a0c831d into w3c:gh-pages Jul 19, 2019
@danyao danyao deleted the danyao-reject-on-inactive branch July 19, 2019 17:40
@marcoscaceres
Copy link
Member

Just noting that we will be keeping the previous behavior in Firefox. I don’t imagine it will cause any interop issues (hopefully!).

@domenic
Copy link
Collaborator

domenic commented Jul 19, 2019

How does that work? Does Firefox violate the HTML spec and run the event loop even in non-active documents?

@marcoscaceres
Copy link
Member

How does that work?

We monitor if the document becomes non-active and reject the relevant promises.

Does Firefox violate the HTML spec and run the event loop even in non-active documents?

No (maybe). We just don’t leave the promises unsettled.

@domenic
Copy link
Collaborator

domenic commented Jul 19, 2019

Well, unless you run the event loop in non-active documents, you can never observe the promise becoming settled, because you have to run the event loop to call any fulfillment/rejection handlers... That's why I was mentioning in #872 (comment) that introducing this requirement was a mess-up.

@marcoscaceres
Copy link
Member

Ok, I’ll have another read of the architecture discussion. I didn’t read it very closely as I thought it was a limitation in Blink. If it applies to Gecko too, I can remove the code.

@domenic
Copy link
Collaborator

domenic commented Jul 19, 2019

Pro-tip: just read my posts in that thread, since they come from someone not as familiar with the Blink architecture, but instead with the spec ^_^.

@marcoscaceres
Copy link
Member

Ok, I see. I think it should be fine to change Gecko too. I’ll file a bug and do some investigation next week.

@marcoscaceres
Copy link
Member

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

Successfully merging this pull request may close these issues.

Reject promise if document becomes not fully active

3 participants