[DNR] Prototype of rule evaluation engine
Categories
(WebExtensions :: Request Handling, enhancement, P1)
Tracking
(firefox108 fixed)
Tracking | Status | |
---|---|---|
firefox108 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
(Blocks 4 open bugs)
Details
(Whiteboard: [mv3-m2])
Attachments
(2 files)
The declarativeNetRequest API specifies a set of rules (conditions + actions) to apply to network requests, but does not prescribe the exact algorithm. In order to enable experimentation of different algorithms, I'll start the patch stack with a non-optimized implementation of a rule evaluation engine and use that to implement the different parts of the DNR API at a functional level. With a functioning API, it will be easier to refactor the algorithm without major changes to unit tests or performance tests.
The evaluation engine takes a registered set of rules, evaluates the conditions and applies the relevant actions.
The matching algorithm of the prototype is not optimized and not final, and merely exists to prepare the other parts of the DNR API.
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 1•7 months ago
|
||
This patch provides a rule evaluation engine for the DNR extension API,
using a naive linear API to evaluate rules for a given request.
The main purpose of this is to offer DNR functionality for relatively
simple use cases, as the more complex ones are likely going to use the
blocking webRequest API instead.
Assignee | ||
Comment 2•5 months ago
|
||
And added "TODO bug 1797376" to the hostname format in Schemas.jsm,
because the implementation does not match the name. Because of that,
this patch introduces the new "canonicalDomain" schema format.
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/588516a44335 Add DNR rule evaluation engine r=rpl https://hg.mozilla.org/integration/autoland/rev/e0ceef9dd1ae Add DNR domain condition validation + matching r=rpl
Comment 4•5 months ago
|
||
Backed out for causing xpc failures in toolkit/components/extensions/test/xpcshell/test_ext_dnr_testMatchOutcome.js
Backout link: https://hg.mozilla.org/integration/autoland/rev/dc344f30a13a1cdfb51232a67fff9284310609eb
TEST-UNEXPECTED-TIMEOUT | xpcshell-remote.ini:toolkit/components/extensions/test/xpcshell/test_ext_dnr_testMatchOutcome.js | Test timed out
Assignee | ||
Updated•5 months ago
|
Pushed by rob@robwu.nl: https://hg.mozilla.org/integration/autoland/rev/fd3dcd9ca329 Add DNR rule evaluation engine r=rpl https://hg.mozilla.org/integration/autoland/rev/5e048345ff64 Add DNR domain condition validation + matching r=rpl
Comment 6•5 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/fd3dcd9ca329
https://hg.mozilla.org/mozilla-central/rev/5e048345ff64
Description
•