Addon install cancellation is silently ignored when invoked while AddonInstall's loadManifest is being run
Categories
(Toolkit :: Add-ons Manager, defect, P3)
Tracking
()
People
(Reporter: robwu, Assigned: agi)
References
(Regression)
Details
(Keywords: regression, Whiteboard: [geckoview:p1])
Attachments
(2 files)
It seems that an AddonInstall's cancel method should either cancel the install, or throw an error.
However, there is a small window where this is not the case:
- When a XPI download request finishhes,
DownloadAddonInstall'sonStopRequestis invoked, which clears thechannelmember. - While state is still
STATE_DOWNLOADING, the asynchronousloadManifestmethod is invoked, which may take several dozens of milliseconds. - If
cancelis called before the state is changed, then thecancelinvocation is silently ignored (becausechannelwas cleared in step 1).
The expected result is that cancel throws an error,
OR that the install is immediately canceled and cleaned up.
The current logic was introduced in bug 1116629, and the condition of interest is:
We have to wait until the channel closes before deleting it.
If this is the only condition, then it seems that we can run the cleanup logic right away. OTOH, loadManifest reads the contents of the XPI, so throwing an error may be safer.
The priority flag is not set for this bug.
:ddurst, could you have a look please?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
| Assignee | ||
Comment 3•1 year ago
|
||
| Assignee | ||
Comment 4•1 year ago
|
||
Pushed by asferro@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1c8a51c4efb Reject install.cancel() call when loadManifest is running. r=mixedpuppy,robwu https://hg.mozilla.org/integration/autoland/rev/c26fdb0faea7 Rename STATE_CHECKING -> STATE_CHECKING_UPDATE. r=mixedpuppy
Comment 6•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/c1c8a51c4efb
https://hg.mozilla.org/mozilla-central/rev/c26fdb0faea7
Updated•1 year ago
|
Description
•