Closed Bug 1010234 Opened 11 years ago Closed 7 years ago

Disabling a bootstrap add-on calls 'shutdown' on the add-on even if we haven't yet called 'startup'

Categories

(Toolkit :: Add-ons Manager, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1461062

People

(Reporter: Irving, Unassigned)

References

(Blocks 1 open bug)

Details

During manual testing for bug 760356, I noticed some odd errors in the log; it turns out that when we disable a bootstrap add-on, we don't check whether the add-on manager has initialized that add-on yet. This causes us to call the add-on's 'shutdown' method even though we have not yet called 'startup', which could cause the add-on to fail. In this case, I had: - change the "extensions.lastAppVersion" preference so that the 'Firefox is being updated' logic would kick in - cleared the "extensions.shownSelectionUI" preference, so that the selection UI would be presented - Started Firefox; when the select add-ons UI was presented, I un-checked the 'cycle collector graph analyzer' add-on so that it would be disabled. Because the selection UI runs before the add-on manager initializes the add-ons, we haven't called the 'startup' bootstrap method yet. When the selection ui sets addon.userDisabled to true, XPIProvider.updateAddonDisabledState calls the bootstrap 'shutdown'. 1400073486737 addons.xpi DEBUG Loading bootstrap scope from /Users/ireid/Library/Application Support/Firefox/Profiles/sngia9xd.debug/extensions/cycle.collector.graph.analyzer@pettay.fi.xpi 1400073486772 addons.xpi DEBUG Calling bootstrap method shutdown on cycle.collector.graph.analyzer@pettay.fi version 0.0.1 1400073486775 addons.xpi WARN Exception running bootstrap method shutdown on cycle.collector.graph.analyzer@pettay.fi: [Exception... "Component returned failure code: 0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED) [nsIComponentRegistrar.unregisterFactory]" nsresult: "0x80040154 (NS_ERROR_FACTORY_NOT_REGISTERED)" location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///Users/ireid/Library/Application%20Support/Firefox/Profiles/sngia9xd.debug/extensions/cycle.collector.graph.analyzer@pettay.fi.xpi!/bootstrap.js :: shutdown :: line 99" data: no] Stack trace: shutdown()@resource://gre/modules/addons/XPIProvider.jsm -> jar:file:///Users/ireid/Library/Application%20Support/Firefox/Profiles/sngia9xd.debug/extensions/cycle.collector.graph.analyzer@pettay.fi.xpi!/bootstrap.js:99 < XPI_callBootstrapMethod()@resource://gre/modules/addons/XPIProvider.jsm:4239 < XPI_updateAddonDisabledState()@resource://gre/modules/addons/XPIProvider.jsm:4354 < AddonWrapper_userDisabledSetter()@resource://gre/modules/addons/XPIProvider.jsm:6659 < apply()@selectAddons.xml:217 < gUpdate_show()@selectAddons.js:273 < showView()@selectAddons.js:21 < gConfirm_next()@selectAddons.js:243 < oncommand()@selectAddons.xul:1 < XPI_startup()@resource://gre/modules/addons/XPIProvider.jsm:1872 < AMI_callProviders()@resource://gre/modules/AddonManager.jsm:870 < AMI_startup()@resource://gre/modules/AddonManager.jsm:746 < AMP_startup()@resource://gre/modules/AddonManager.jsm:2313 < AMC_observe()@addonManager.js:53 < <file:unknown> 1400073486788 addons.xpi DEBUG Removing manifest for /Users/ireid/Library/Application Support/Firefox/Profiles/sngia9xd.debug/extensions/cycle.collector.graph.analyzer@pettay.fi.xpi
I'm guessing this can only happen with the selection UI which is the only thing that runs at startup before we've loaded the add-ons. Isn't that UI going away?
(In reply to Dave Townsend [:mossop] from comment #1) > I'm guessing this can only happen with the selection UI which is the only > thing that runs at startup before we've loaded the add-ons. True for now; I'm OK with "wontfix/not important enough" if you want. > Isn't that UI going away? Opinions differ; bug 899173 suggests doing another run of the selection UI.
Blocks: 899173
If it's going away then I think there isn't much point in spending time on it. Otherwise we should probably fix it.
Let's assume that it's not going away, for the time being. The auto-disable flag has been largely ineffective to date, so there are a lot of reasons we'll probably want to run the opt-in again in the future.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.