Open Bug 1736673 Opened 3 years ago Updated 1 year ago

generate data to automate loading builtin addons

Categories

(Toolkit :: Add-ons Manager, task, P3)

task
Points:
3

Tracking

()

People

(Reporter: mixedpuppy, Unassigned)

References

Details

(Whiteboard: [addons-jira])

Currently builtin addons (not system) require a call to install them (AddonManager.maybeInstallBuiltinAddon) sometime during startup. This call tries to shortcut the install by also requiring the version number. If the currently cached addon data is the same version number, no install is performed.

The results in a bunch of work for builtin addons to manage that call (usually in browserGlue), updating browserGlue for every update of the addon.

Instead, we should generate a jsm at build time that loads builtin addons. It should only cover those addons located in resource://builtin-addons so other special cases such as themes and search are not covered by this.

We also need to uninstall any removed builtin addons. So we need something in the builtin addon location class that can help to do that.

An alternative/addition to the above is that we do not use the maybeInstallBuiltinAddon, but always call install for APP_INSTALL or APP_UPDATE startups. That would remove the need for the addon version as a part of the call.

system-addon list generation.
https://searchfox.org/mozilla-central/source/toolkit/mozapps/extensions/moz.build#30-33

I'm adding Bug 1582788 as a blocker, the rationale is that (as we did notice as part of Bug 1735721):

  • on adding new built add-ons we may likely be triggering a new failure in the browser/base/content/test/performance/browser_startup_syncIPC.js test case if the background page for a builtin extensions background page happen to be created exactly when that test is enforcing no additional sync IPC (if an exception is not explicitly added to take that into account)
  • the syncIPC seems to be triggered because of the dummy.xhtml file we are currently using internally to host the hidden extension pages (and the background page in particular, the extension devtools page is only created when a toolbox is being opened and it wouldn't effect startup performance)
  • while discussing about Bug 1735721 backout due to the browser_startup_syncIPC.js test failure with Florian we agreed to add an exception for Bug 1735721 to prevent that failure in the short run, while a more long term solution would be to avoid that sync IPC all together, and Bug 1582788 may allow us to achieve that.
  • given that this bug aims to make it simpler and less manual to add new built-ins, it would be good if we don't need to manually add (and remove) exceptions for the browser_startup_syncIPC.js test for each of the changes to the list of built-ins.
Depends on: 1582788
No longer depends on: 1582788
Priority: -- → P3
Whiteboard: [addons-jira]
Severity: -- → N/A
Points: --- → 3
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.