Closed Bug 1279472 Opened 7 years ago Closed 6 years ago

[disco pane] mozAddonManager.getAddonByID is not aware of installing/uninstalling pending a restart


(Toolkit :: Add-ons Manager, defect, P2)






(Reporter: scolville, Assigned: aswan)



(Whiteboard: triaged)

See these two related issues on the new disco pane for full STR.

In a nutshell, if a install is underway and requires a restart getAddonByID doesn't return anything. This means we assume the Add-on is uninstalled.

Similarly if an add-on is uninstalling and requires a restart getAddonByID returns the add-on but doesn't provide the needsRestart hint. Again this leads to us making it look like the add-on is installed, when in fact it's pending removal.

In both cases About:addons#Extensions reflects the state correctly so it must be using some other means to know that the restart is pending in each case.

To fix this could we update getAddonByID to always return when the add-on is installing pending a restart, and to return the needsRestart hint when the add-on is uninstalling pending a restart?
For both cases perhaps mozAddonManager.getAddonByID could look at getAddonsWithOperationsByTypes() [1] and still return the addon if the addon we're trying to introspect is in that list. Additionally prescence in that list could also fill in the needsRestart hint.

Assignee: nobody → aswan
Blocks: 1245993
Blocks: 1280502
Priority: -- → P2
Whiteboard: triaged
We've had no shortage of other issues with addons that require a restart, but at this point I think we've agreed to just punt on all of them and take care to only use extensions that we are certain will be restartless on the disco pane.
Please reopen if I've overlooked something...
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.