bug 957062 - Pass APK download error back to webpage; r=wesj

--HG--
extra : rebase_source : 6428fc64176d1e0e31ebd5026fdb51e781ac4937
This commit is contained in:
Martyn Haigh 2014-01-24 21:02:27 -08:00
Родитель 01c2a7f857
Коммит c57692c258
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -43,7 +43,7 @@ this.WebappManager = {
return;
}
this._downloadApk(aMessage);
this._downloadApk(aMessage, aMessageManager);
},
installPackage: function(aMessage, aMessageManager) {
@ -53,10 +53,10 @@ this.WebappManager = {
return;
}
this._downloadApk(aMessage);
this._downloadApk(aMessage, aMessageManager);
},
_downloadApk: function(aMsg) {
_downloadApk: function(aMsg, aMessageManager) {
let manifestUrl = aMsg.app.manifestURL;
dump("_downloadApk for " + manifestUrl);
@ -94,7 +94,8 @@ this.WebappManager = {
data: JSON.stringify(aMsg),
});
} else { // type == "failure"
// TODO: handle error better.
aMsg.error = message;
aMessageManager.sendAsyncMessage("Webapps:Install:Return:KO", aMsg);
dump("error downloading APK: " + message);
}
}