Closed Bug 1894128 Opened 2 months ago Closed 1 month ago

[DNR] Replace MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES

Categories

(WebExtensions :: Request Handling, task, P2)

task

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: robwu, Assigned: rpl)

References

(Blocks 3 open bugs)

Details

(Keywords: dev-doc-needed, Whiteboard: [wecg][addons-jira])

Attachments

(1 file)

Chrome initially had a shared quota between dynamic and session rules at 5k (DNR constant: MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES). We had separate quotas from the start, but supported the constant for compatibility. Now Chrome has dropped MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES from their documentation because it has been superseded by four separate constants in https://issues.chromium.org/issues/40282671 . Besides the separation of dynamic/session (which Firefox already has), Chrome also introduces the distinction between "safe" and "unsafe" rules.

The purpose of this bug is to make sure that the following happens:

  1. introducing the following constants to the declarativeNetRequest namespace:

    • MAX_NUMBER_OF_SESSION_RULES (5000)
    • MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES (5000)
    • MAX_NUMBER_OF_UNSAFE_SESSION_RULES (5000)
    • MAX_NUMBER_OF_DYNAMIC_RULES (5000 initially, ultimately 30000 as part of bug 1894119)
  2. introduce the concept of safe rules, as described at https://github.com/w3c/webextensions/issues/319#issuecomment-1682073791

    • note: if we start with MAX_NUMBER_OF_DYNAMIC_RULES = 5000 (equal to MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES), then we could defer this part to bug 1894119.
  3. bumping the actual dynamic rule limit, which is part of bug 1894119

Severity: -- → N/A
Priority: -- → P2
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
See Also: → 1899259
Blocks: 1899260

The patch in this bug only adds MAX_NUMBER_OF_DYNAMIC_RULES and MAX_NUMBER_OF_UNSAFE_SESSION_RULES instead of MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES. The removal of MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES will happen in a separate bug.

The MAX_NUMBER_OF_UNSAFE_DYNAMIC_RULES and MAX_NUMBER_OF_UNSAFE_SESSION_RULES constants will be covered in bug 1894119.

Summary: [DNR] Add safe rules and replace MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES → [DNR] Replace MAX_NUMBER_OF_DYNAMIC_AND_SESSION_RULES
Blocks: 1899348
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/457cd5c565fb
[DNR] Replace MAX_NUMBER_OF_DYNAMIC_SESSION_RULES with two separate limits. r=robwu
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

Change are ready for review:

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: