Closed Bug 1438364 Opened 3 years ago Closed 1 year ago

Cleanup data for uninstalled extensions in ExtensionSettingsStore


(WebExtensions :: General, enhancement, P2)



(firefox70 fixed, firefox71 fixed)

Tracking Status
firefox70 --- fixed
firefox71 --- fixed


(Reporter: mstriemer, Assigned: mixedpuppy)


(Blocks 1 open bug)



(1 file)

Currently if you're storing anything in ExtensionSettingsStore you need to ensure that you clean it up in the onUninstall callback or we'll get a storage/memory leak. There isn't normally a lot of data in there but it's quite easy to forget to clean something up right now.

When an extension is uninstalled the ExtensionSettingsStore should remove all data for that extension. That should prevent leaks in the future but won't cleanup anything that we've already leaked. It might be appropriate to do a cleanup on startup or shutdown as well based on the currently installed extensions.
Product: Toolkit → WebExtensions

note: the cleanup of leaked (or externally removed) extensions is in bug 1411046.

See Also: → 1411046
Assignee: nobody → mixedpuppy
Blocks: 1578508
Attachment #9088320 - Attachment description: Bug 1438364 cleanup settings data for uninstalled extensions → Bug 1438364 ensure settings data is cleared during uninstall
Pushed by
ensure settings data is cleared during uninstall r=robwu
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Will this fix require manual validation or is it covered by automated tests? If yes, please provide some steps to reproduce in order to correctly test it as in issue 1411046) and also, please set the "qe-verify+" flag.
Otherwise, could the "qe-verify-" flag be added? Thank you.

Flags: needinfo?(mixedpuppy)

has tests.

Flags: needinfo?(mixedpuppy) → qe-verify-

Comment on attachment 9088320 [details]
Bug 1438364 ensure settings data is cleared during uninstall

Beta/Release Uplift Approval Request

  • User impact if declined: An addon that modified newtab settings may not remove the setting upon uninstall.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: Bug 1411046, Bug 1576266, Bug 1580049
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Another minimal patch making iterative fixes to preference controls in webextensions.
  • String changes made/needed: none
Attachment #9088320 - Flags: approval-mozilla-beta?

Comment on attachment 9088320 [details]
Bug 1438364 ensure settings data is cleared during uninstall

Low risk patch with tests and the list of other uplifts needed are already landed on beta, approved of 70 beta 9, thanks.

Attachment #9088320 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.