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

Cancel requests with the same requestId #1114

Conversation

stoically
Copy link
Member

@stoically stoically commented Feb 9, 2018

Prevents potential redirects from opening two tabs. Detailed explanation is here.

Added also a test to #1107 which you can see fail without this fix.

Affects #940 #1003 #1080 - but doesn't fully fix them. Fewer people should be affected by two tabs opening especially in combination with Add-ons that redirect.

@stoically stoically force-pushed the cancel-already-handled-requests branch 6 times, most recently from 69493f7 to 4af28a1 Compare February 9, 2018 11:20
Prevents potential redirects from opening two tabs
Closes mozilla#1114
@stoically stoically force-pushed the cancel-already-handled-requests branch from 4af28a1 to db35abb Compare February 9, 2018 13:26
Copy link
Contributor

@jonathanKingston jonathanKingston left a comment

Choose a reason for hiding this comment

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

Random timeouts worry me but from memory we do this elsewhere. I need to verify this in a build for edge cases too.

@jonathanKingston jonathanKingston changed the base branch from master to testing-6.0.0 February 9, 2018 17:59
@jonathanKingston jonathanKingston merged commit 7dceaf6 into mozilla:testing-6.0.0 Feb 9, 2018
@stoically stoically deleted the cancel-already-handled-requests branch February 9, 2018 23:59
@stoically
Copy link
Member Author

I agree that a timeout to clean up is not a clean solution - unfortunately I couldn't think of something else to handle this in the WebExtension, since we have no knowledge how many onBeforeRequest handlers are registered. So in theory any number of redirects depending on the number of Add-ons can happen. Same applies for 302 redirects, since there could also be multiple ones.

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.

2 participants