Only query active StreamFilters if webRequestBlocking permission is granted and prevent race with extension shutdown
Categories
(WebExtensions :: Request Handling, defect, P1)
Tracking
(firefox104 fixed)
Tracking | Status | |
---|---|---|
firefox104 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
While investigating Bug 1774497 TV intermittent failure, we have noticed that we could restrict the call to ParentAPIManager.queryStreamFilterSuspendCancel to the extensions that have a webRequestBlocking permission granted.
In addition to that, I investigate the race that Bug 1774497 caught (which I was able to also trigger locally on an android x86 debug build by using --verify and --disable-fission mach xpcshell-test
cli options) because skipping the call to queryStreamFilterSuspendCancel
for extensions without the "webRequestBlocking" permission was going to hide that and there were actually two kind of errors that the race between the call to queryStreamFilterSuspendCancel
to be resolved and the extension being shutdown in the meantime:
ExtensionParent.ParentAPIManager.queryStreamFilterSuspendCancel
may reject with an AbortError if the extension shutdown before the returned promise is resolvedthis.extension
may be nullified by the time we are going to callthis.onShutdown(false)
nearby the end of theterminateBackground
async function
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
Updated•2 years ago
|
Pushed by luca.greco@alcacoop.it: https://hg.mozilla.org/integration/autoland/rev/205ee354f198 Only query active StreamFilters if webRequestBlocking permission is granted and prevent race with extension shutdown. r=mixedpuppy
Comment 3•2 years ago
|
||
bugherder |
Description
•