Closed Bug 1554703 Opened 5 years ago Closed 3 years ago

XPIProvider unnecessarily scans for all scopes at the second startup

Categories

(Toolkit :: Add-ons Manager, defect, P2)

defect

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: robwu, Assigned: mixedpuppy)

Details

Attachments

(1 file)

scanForChanges should only scan in every location right after a new install or update. Unexpectedly, it also scans for changes at the second start-up (but not after the third, fourth, etc.).

  1. At the first run after a new install or browser update, aAppChanged is not false, and scanForChanges(aAppChanged === false) is equivalent to scanForChanges(false).

  2. Because the ignoreSideloads parameter is false, the right-hand-side of ignoreSideloads && !(loc.scope & gStartupScanScopes never runs, so the gStartupScanScopes getter that is responsible for setting the extensions.lastAppBuildId pref is not triggered. All scopes are scanned, as expected.

  3. At the next start-up of the same browser version, aAppChanged is false, and scanForChanges(true) is called. Now the gStartupScanScopes getter is triggered, and since the extensions.lastAppBuildId pref had not been set before, the getter thinks that the build ID has changed and forces a scan of all scopes.

The last part of step 3 is unexpected: The browser has really not been updated (any changes should already have been detected at step 1), so there should not be a forced scan of all scopes.

Reproduced in Firefox 66.0.3 (originally observed in bug 1549129) and Firefox 69.0a1 buildID 20190523044159.

Priority: -- → P2
Assignee: nobody → mixedpuppy
Status: NEW → ASSIGNED
Pushed by scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c19e5f49c88f
fix setting lastAppID pref during AOM startup and scanForChanges r=robwu
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: