Closed Bug 1056226 Opened 10 years ago Closed 10 years ago

"Unrecoverable" app uninstall does not send manifest information to uninstall event

Categories

(Core Graveyard :: DOM: Apps, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED
mozilla34

People

(Reporter: kgrandon, Assigned: fabrice)

References

Details

Attachments

(1 file)

This is probably fairly rare, but it can break the homescreen if it happens. We define an unrecoverable app state as the following:

// Must be pending (meaning not launchable)
app.installState === 'pending' &&
// Without any option for downloading the app
!app.downloadAvailable &&
// And not be currently applying a download
!app.readyToApplyDownload


When we call mgmt.uninstall() we do not receive manifest information for the uninstalled app. This was working prior to bug 899322 landing.
Not sure why I made this change initially. Looks pretty dumb :(
Anyway, we'll catch that in tests now on the gecko side too.
Assignee: nobody → fabrice
Attachment #8476146 - Flags: review?(mar.castelluccio)
Comment on attachment 8476146 [details] [diff] [review]
app-uninstall.patch

Review of attachment 8476146 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/apps/tests/test_install_multiple_apps_origin.html
@@ +86,5 @@
>    is(app2.manifestURL, manifestURL2, "App 2 manifest url is correct.");
>  
> +  navigator.mozApps.mgmt.onuninstall = function(event) {
> +    var app = event.application;
> +    dump("onuninstall event.app is " + app + "\n");

Nit: Use |info| here or remove the dump.
Attachment #8476146 - Flags: review?(mar.castelluccio) → review+
https://hg.mozilla.org/mozilla-central/rev/a53cafed66b9
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Flags: qe-verify-
Flags: in-testsuite+
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: