ChannelWrapper.matches throws on webRequest listeners with "xbl" filter.type
Categories
(WebExtensions :: Request Handling, defect, P1)
Tracking
(firefox-esr68 unaffected, firefox76 unaffected, firefox77 unaffected, firefox78 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox76 | --- | unaffected |
firefox77 | --- | unaffected |
firefox78 | --- | fixed |
People
(Reporter: rpl, Assigned: rpl)
References
(Regression)
Details
(Keywords: dev-doc-complete, regression)
Attachments
(1 file)
While looking into the reasons behind Bug 1638476 I noticed that the webRequest listener registered by AdBlock Plus does contain all the filter type values currently listed as supported in the webRequest API schemas (as part of the ResourceType enum) and the "xbl" filter type is triggering an exception when WebRequest.jsm calls ChannelWrapper.matches.
In Bug 1636900 "xbl" has been removed from the values support by ChannelWrapper, but it is still listed as supported in the webRequest API schema.
We should:
- add a regression test to prevent to miss to notice if the values in the ResourceType enum are not in sync with what ChannelWrapper.matches does actually support
- remove "xbl" from the values listed as supported in the ResourceType enum
- when a webRequest listener is registered, we should log a warning (instead of throwing an error) and remove unsupported ResourceType values from the normalized values
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Comment 2•5 years ago
|
||
Sorry for not realizing this would break when suggesting and reviewing bug 1636900!
Updated•5 years ago
|
Comment 3•5 years ago
|
||
Set release status flags based on info from the regressing bug 1636900
Comment 5•5 years ago
|
||
bugherder |
Assignee | ||
Comment 6•5 years ago
|
||
(In reply to :Gijs (he/him) from comment #2)
Sorry for not realizing this would break when suggesting and reviewing bug 1636900!
No worries at all, we should have covered that enum with a test sooner to prevent it from regressing without being noticed.
Assignee | ||
Updated•5 years ago
|
Updated•5 years ago
|
Assignee | ||
Comment 8•4 years ago
|
||
(In reply to kernp25 from comment #7)
Does this page also needs to be updated?
yes, I was convinced that I did already set a dev-doc-needed already on this bug, but apparently I didn't, thanks for needinfo-ing me
I see that you did also mention that 15 days ago in bug 1636900 and that a dev-doc-needed has been added on that issue, but maybe it will not be clear that it is related to changes to the WebExtensions API docs, I'll add it here and provide some details about the kind of changes we need.
Assignee | ||
Comment 9•4 years ago
|
||
Scope for the dev-doc-needed:
- in webRequest/ResourceType API doc page on MDN, mark "xbl" as deprecated starting from Firefox 78
- in WebRequest/RequestFilterWebRequest/RequestFilter API doc page on MDN, mention on the
types
property description that an invalid/unsupported value is going to log a warning starting from Firefox 78 (but it does throw a validation error in Firefox < 78)
Maybe we could also add a note about this last point also in the metadata for RequestFilter defined in https://github.com/mdn/browser-compat-data/blob/790eeb364cf5f19e589830b5242547890fbf7039/webextensions/api/webRequest.json#L115-L135.
Comment 10•4 years ago
|
||
(In reply to Luca Greco [:rpl] [:luca] [:lgreco] from comment #9)
Scope for the dev-doc-needed:
- in webRequest/ResourceType API doc page on MDN, mark "xbl" as deprecated starting from Firefox 78
I've marked "xbl" as unsupported in the BCD table: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/webRequest/ResourceType#Browser_compatibility
- in WebRequest/RequestFilterWebRequest/RequestFilter API doc page on MDN, mention on the
types
property description that an invalid/unsupported value is going to log a warning starting from Firefox 78 (but it does throw a validation error in Firefox < 78)
I've added a note to the BCD table: https://wiki.developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/WebRequest/RequestFilter#Browser_compatibility
Marking as dev-doc-complete, but please let me know if you need anything else.
Description
•