-
-
Notifications
You must be signed in to change notification settings - Fork 944
extension: Make it if cleanup fails RuleCondition test does nothing #22592
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
base: master
Are you sure you want to change the base?
extension: Make it if cleanup fails RuleCondition test does nothing #22592
Conversation
bd47ce8 to
252f7b8
Compare
kjarosh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense even if it doesn't fix #22589
|
Is it somehow possible that we need cleanup even if |
|
We shouldn't i don't think as it's only false if the rule registering throws in both trys (which should mean no rules were registered). |
|
The code was suggested by Rob--W of the Mozilla extension team: w3c/webextensions#638 (comment) |
|
(I just don't understand the PR title / commit message ... is there a word missing?) |
|
Make it (so) if cleanup fails (the) RuleCondition test (still) does nothing |
252f7b8 to
684a7d7
Compare
This section of code tests if the responseHeaders RuleCondition is supported and not behind a flag, but if the RuleCondition is enabled behind a flag it will successfully register a rule which matches any request, even if it doesn't match the unsupported RuleCondition. What that means is on Chromium 121-127 a rule is registered via lines 37 - 50 that blocks every request. It shouldn't matter though, as that rule is removed by lines 57 - 59, but just in case that fails to remove the rule, it's better if the rule does nothing.