Closed
Bug 830258
Opened 12 years ago
Closed 12 years ago
[Webapps] .uninstall() should return "Webapps:Uninstall:Return:KO" when uninstalling a non-removable app
Categories
(Core Graveyard :: DOM: Apps, defect)
Core Graveyard
DOM: Apps
Tracking
(blocking-b2g:-, firefox19 wontfix, firefox20 wontfix, firefox21 fixed, b2g1819+ fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)
People
(Reporter: airpingu, Assigned: airpingu)
Details
(Whiteboard: [qa-])
Attachments
(2 files, 2 obsolete files)
3.75 KB,
patch
|
fabrice
:
review+
lsblakk
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
1.91 KB,
patch
|
airpingu
:
review+
lsblakk
:
approval-mozilla-b2g18+
|
Details | Diff | Splinter Review |
I discovered a potential logic error when I was tracing the .uninstall() codes:
uninstall: function(aData, aMm) {
for (let id in this.webapps) {
let app = this.webapps[id];
if (app.origin != aData.origin) {
continue;
}
if (!app.removable)
return;
(skip...)
return;
}
aMm.sendAsyncMessage("Webapps:Uninstall:Return:KO", aData);
},
Do we need to return "Webapps:Uninstall:Return:KO" when attempting to uninstall a non-removable app? The caller would probably hang there if it cannot receive any return from its .onsuccess/.onerror callbacks.
Fabrice, how do you feel? Please let me know if we need to provide a patch for this (or not). Thanks!
Comment 1•12 years ago
|
||
Yes, we can do that.
Updated•12 years ago
|
blocking-b2g: --- → tef?
Updated•12 years ago
|
tracking-b2g18:
--- → ?
Updated•12 years ago
|
Blocks: app-install
Updated•12 years ago
|
No longer blocks: app-install
Updated•12 years ago
|
blocking-b2g: tef? → -
Assignee | ||
Comment 2•12 years ago
|
||
Assignee: nobody → clian
Attachment #702121 -
Flags: review?(fabrice)
Comment 3•12 years ago
|
||
Comment on attachment 702121 [details] [diff] [review]
Easy fix!
Review of attachment 702121 [details] [diff] [review]:
-----------------------------------------------------------------
Gene, can you add a test?
Attachment #702121 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 4•12 years ago
|
||
OK! No problem!
Assignee | ||
Comment 5•12 years ago
|
||
Carry on review+ with r=fabrice.
Attachment #702121 -
Attachment is obsolete: true
Attachment #702734 -
Flags: review+
Assignee | ||
Comment 6•12 years ago
|
||
Hi Fabrice,
I provide a test case to test the error return of "NOT_INSTALLED", which hasn't been tested before.
Honestly, I don't quite understand how to simulate a non-removable app for testing. May I have your suggestion please? Or just don't need to do that if it's actually hard to make one?
Attachment #702736 -
Flags: feedback?(fabrice)
Assignee | ||
Comment 7•12 years ago
|
||
See try first: https://tbpl.mozilla.org/?tree=Try&rev=42dd7ba57967 (looks good!)
Assignee | ||
Comment 8•12 years ago
|
||
Hi Fabrice, ping a bit.
Assignee | ||
Comment 9•12 years ago
|
||
Comment on attachment 702736 [details] [diff] [review]
Part 2, provide test case
Please see comment #6 for the summary. Thanks!
Attachment #702736 -
Flags: feedback?(fabrice) → review?(fabrice)
Updated•12 years ago
|
Attachment #702736 -
Flags: review?(fabrice) → review+
Assignee | ||
Comment 10•12 years ago
|
||
Rebased.
Attachment #702734 -
Attachment is obsolete: true
Attachment #707975 -
Flags: review+
Assignee | ||
Comment 11•12 years ago
|
||
Assignee | ||
Comment 12•12 years ago
|
||
Comment on attachment 707975 [details] [diff] [review]
Part 1, fix .uninstall(), V1.1
[Approval Request Comment]
Bug caused by (feature/regressing bug #): none
User impact if declined: none
Testing completed: yes
Risk to taking this patch (and alternatives if risky): none
String or UUID changes made by this patch: none
This is fixing a potential logic bug in Webapps.jsm, which reports a proper error to Gaia when attempting to uninstall a non-removable app. So far, the Gaia codes haven't yet tried to catch any error events when calling .uninstall(), therefore this patch is backward-compatible and should be pretty safe to land. As far as I know, we should keep the Webapps.jsm sync'ed as possible as we can to avoid uplifting conflicts, since it's a core module and lots of people are working on it.
Attachment #707975 -
Flags: approval-mozilla-b2g18?
Assignee | ||
Comment 13•12 years ago
|
||
Comment on attachment 702736 [details] [diff] [review]
Part 2, provide test case
[Approval Request Comment]
Bug caused by (feature/regressing bug #): none
User impact if declined: none
Testing completed: yes
Risk to taking this patch (and alternatives if risky): none
String or UUID changes made by this patch: none
This is the corresponding test case to test part-1 patch. Please see comment #12. If part-1 patch got approval to land, it should be fine to land this as well.
Attachment #702736 -
Flags: approval-mozilla-b2g18?
Comment 14•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/aaa82cd26aab
https://hg.mozilla.org/mozilla-central/rev/2025d4fb452f
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Updated•12 years ago
|
Whiteboard: [qa-]
Updated•12 years ago
|
Comment 15•12 years ago
|
||
Comment on attachment 702736 [details] [diff] [review]
Part 2, provide test case
Approving for 1.0.1 (mozilla-b2g18 tip) uplift.
Attachment #702736 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Updated•12 years ago
|
Attachment #707975 -
Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Comment 16•12 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g18/rev/49a989daf5fc
https://hg.mozilla.org/releases/mozilla-b2g18/rev/844a5acc1ec3
status-b2g18:
--- → fixed
status-b2g18-v1.0.0:
--- → wontfix
status-firefox19:
--- → wontfix
status-firefox20:
--- → wontfix
status-firefox21:
--- → fixed
Comment 17•12 years ago
|
||
Batch edit: Bugs fixed on b2g18 after 1/25 merge to v1.0 branch are fixed on v1.0.1 branch.
status-b2g18-v1.0.1:
--- → fixed
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•