зеркало из https://github.com/mozilla/gecko-dev.git
bug 957062 - Pass APK download error back to webpage; r=wesj
--HG-- extra : rebase_source : 6428fc64176d1e0e31ebd5026fdb51e781ac4937
This commit is contained in:
Родитель
01c2a7f857
Коммит
c57692c258
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче