Bug 815198 - [Webapps] Webapps.download should call Webapps.applyDownload when installState is 'pending' [r=ferjm]

This commit is contained in:
Fabrice Desré 2012-11-27 08:40:18 -08:00
parent b7e39ca538
commit 747dd4e1aa

View File

@ -20,7 +20,7 @@ Cu.import("resource://gre/modules/PermissionsInstaller.jsm");
Cu.import("resource://gre/modules/OfflineCacheInstaller.jsm");
function debug(aMsg) {
dump("-*-*- Webapps.jsm : " + aMsg + "\n");
//dump("-*-*- Webapps.jsm : " + aMsg + "\n");
}
const WEBAPP_RUNTIME = Services.appinfo.ID == "webapprt@mozilla.org";
@ -840,6 +840,10 @@ this.DOMApplicationRegistry = {
manifestURL: aManifestURL,
app: app,
manifest: aManifest });
if (app.installState == "pending") {
// We restarted a failed download, apply it automatically.
DOMApplicationRegistry.applyDownload(aManifestURL);
}
});
});
}).bind(this));