Closed
Bug 1255041
Opened 9 years ago
Closed 9 years ago
Add a way to uninstall existing add-ons.
Categories
(Toolkit :: Add-ons Manager, defect)
Toolkit
Add-ons Manager
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox48 | --- | fixed |
People
(Reporter: mossop, Assigned: aswan)
References
Details
Attachments
(1 file)
No description provided.
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → aswan
| Assignee | ||
Comment 1•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/48219/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/48219/
Attachment #8743984 -
Flags: review?(rhelmer)
Comment 2•9 years ago
|
||
Comment on attachment 8743984 [details]
MozReview Request: Bug 1255041 Implement uninstall() on DOM Addon objects r?rhelmer
https://reviewboard.mozilla.org/r/48219/#review45013
::: toolkit/mozapps/extensions/AddonManager.jsm:2874
(Diff revision 1)
> + }
> +
> + try {
> + addon.uninstall();
> + resolve(true);
> + } catch (err) {
Can we log the error here too, maybe with `logger.warn()`?
::: toolkit/mozapps/extensions/test/browser/browser_webapi_uninstall.js:20
(Diff revision 1)
> + }
> +}
> +
> +function API_uninstallByID(browser, id) {
> + return ContentTask.spawn(browser, id, function*(id) {
> + let addon = yield content.navigator.mozAddonManager.getAddonByID(id);
Do we need to test that `navigator.mozAddonManager` can't be accessed by disallowed sites or is that covered already elsewhere?
Attachment #8743984 -
Flags: review?(rhelmer) → review+
| Assignee | ||
Comment 3•9 years ago
|
||
https://reviewboard.mozilla.org/r/48219/#review45013
> Can we log the error here too, maybe with `logger.warn()`?
Yes, good idea, failures here should be infrequent (in fact, I couldn't come up with a good way to construct a scenario in which an uninstall fails which is why there isn't a test case of uninstall returning false). I'll use `Cu.reportError` so we get the whole stack and such.
> Do we need to test that `navigator.mozAddonManager` can't be accessed by disallowed sites or is that covered already elsewhere?
That's mean to be covered here: https://dxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/test/browser/browser_webapi_access.js
| Assignee | ||
Comment 4•9 years ago
|
||
Comment on attachment 8743984 [details]
MozReview Request: Bug 1255041 Implement uninstall() on DOM Addon objects r?rhelmer
Review request updated; see interdiff: https://reviewboard.mozilla.org/r/48219/diff/1-2/
| Assignee | ||
Updated•9 years ago
|
Iteration: --- → 48.3 - Apr 25
| Assignee | ||
Comment 5•9 years ago
|
||
One failure here in a loop test but it passed on retrigger:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=2b9ee3907cf4
Keywords: checkin-needed
Keywords: checkin-needed
Comment 7•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•