Closed Bug 1438364 Opened 2 years ago Closed 27 days ago

Cleanup data for uninstalled extensions in ExtensionSettingsStore

Categories

(WebExtensions :: General, enhancement, P2)

enhancement

Tracking

(firefox70 fixed, firefox71 fixed)

RESOLVED FIXED
mozilla71
Tracking Status
firefox70 --- fixed
firefox71 --- fixed

People

(Reporter: mstriemer, Assigned: mixedpuppy)

References

(Blocks 1 open bug)

Details

Attachments

(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 scaraveo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/144ddd75f003
ensure settings data is cleared during uninstall r=robwu
Status: NEW → RESOLVED
Closed: 27 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71

Hello,
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.