Include ExtensionMenuStore data persisted on disk into the profile backup
Categories
(Firefox :: Profile Backup, task, P3)
Tracking
()
People
(Reporter: rpl, Unassigned)
References
(Blocks 1 open bug)
Details
As part of Bug 1771328 we have introduced a new ExtensionMenusStore, which persist menu entries created by extensions (both MV2 and MV3) with an event page as background script into a kvstore subdirectory named "extension-store-menus" in the profile directory (see here in ExtensionMenus.sys.mjs).
This data is expected to stay persisted across browser sessions and so it seems part of data we should be including along with other extension data in the profile backup.
As a side note, ExtensionMenus is debouncing saving changes to the kvstore with a default debounce time set to 5 seconds (see MENU_STORE_WRITE_DEBOUNCE_TIME definition here in ExtensionMenus.sys.mjs) which may need to be taken into account in case there is data not yet written on disk.
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Hey rpl,
What's the worst-case scenario if we happened to copy the file before the debouncer flushed the latest state to disk?
| Reporter | ||
Comment 2•1 year ago
|
||
What's the worst-case scenario if we happened to copy the file before the debouncer flushed the latest state to disk?
When the menus are persisted (which is the case for Manifest V3 extensions and Manifest V2 extensions that have a non-persistent background script, a.k.a. event page) then they are expected to stay persisted across browser restart, up until the next addon version update, and so it would be a kind of data loss that would potentially last until the next addon version update (if there is one).
Basically: If persisted menus are lost, then it would depend from the specific logic that the addon has implemented internally that would allow the user to get the menu back (e.g. the extension could provide an extension options page which may allow the users to recreate the menus, but that would be up to the addon to implement, or the extension could be automatically double-checking if the menus still exist and recreated it automatically).
Description
•