Improve error message when webRequest event listener is passed an invalid `urls` value
Categories
(WebExtensions :: Request Handling, enhancement, P5)
Tracking
(firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: robwu, Assigned: masterwayz, Mentored)
References
Details
(Keywords: good-first-bug)
Attachments
(1 file)
When a webRequest listener is being passed an invalid match pattern, the resulting error is next to useless. See bug 1654524 for example. The global JS console contains:
[Exception... "Illegal value" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://extensions/content/parent/ext-webRequest.js :: registerEvent :: line 46" data: no]
bug 1637431 added a helper to create a MatchPatternSet
, with a fall back to a human-readable error. We should use this helper at https://searchfox.org/mozilla-central/rev/227f22acef5c4865503bde9f835452bf38332c8e/toolkit/components/extensions/parent/ext-webRequest.js#46
Reporter | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
I've talked with robwu about this bug on Matrix. This patch contains the fix along with a test to make sure that it stays working.
Pushed by dluca@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8123bf1bdf73 Improve error message when webRequest listener is passed an invalid urls filter r=robwu
Comment 5•4 years ago
|
||
bugherder |
Description
•