Closed
Bug 780839
Opened 13 years ago
Closed 7 years ago
AddonInstall.cancel() doesn't handle restartless installs that have reached STATE_INSTALLED
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
RESOLVED
INACTIVE
People
(Reporter: Unfocused, Unassigned)
Details
AddonInstall.cancel() is unaware of restartless installs. This is fine during the install, as they act the same as non-restartless installs. However, once the install reaches STATE_INSTALLED and has completed, the new addon has been completely installed - so it can't just delete the staged install.
If we have a restartless install, and try to cancel it once it's reached STATE_INSTALLED (within the onInstallEnded event), we get the following exception:
*** WARN addons.manager: InstallListener threw exception when calling onInstallEnded: [Exception... "Component returned failure code: 0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIFile.directoryEntries]" nsresult: "0x80520012 (NS_ERROR_FILE_NOT_FOUND)" location: "JS frame :: resource://gre/modules/XPIProvider.jsm :: cleanStagingDir :: line 1211" data: no]
There's two ways to fix this:
* Disallow canceling restartless installs once they've completed. This is easy, and kinda makes sense given that the addon has been completely installed.
* Uninstall the addon (or roll back to the previous version, if it was an upgrade). This is hard, mostly due to upgrades - we'd need to keep the old addon, restore that, and somehow deal with multiple upgrades during runtime.
I'm leaning strongly towards the easy way.
Comment 1•13 years ago
|
||
Yeah, just make it throw a sane exception if the install already completed I think. I tend to think of AddonInstall as basically immutable at that point.
Comment 2•7 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INACTIVE
You need to log in
before you can comment on or make changes to this bug.
Description
•