mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-25 22:29:07 +00:00
bug 957062 - Pass APK download error back to webpage; r=wesj
--HG-- extra : rebase_source : 6428fc64176d1e0e31ebd5026fdb51e781ac4937
This commit is contained in:
parent
01c2a7f857
commit
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user