зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1416295 - Support downloading updates from servers that don't support resuming. r=dthayer
MozReview-Commit-ID: Cw0cUibaD3d --HG-- extra : rebase_source : 002e602a32bdcc28eef28aceeaba3038d93947ee
This commit is contained in:
Родитель
899e8c96a4
Коммит
2e8f14b5ac
|
@ -3598,7 +3598,15 @@ class ChannelDownloader extends CommonDownloader {
|
|||
this._bkgFileSaver.onStartRequest(request, context);
|
||||
|
||||
if (request instanceof Ci.nsIResumableChannel) {
|
||||
this._patch.setProperty("entityID", request.entityID);
|
||||
// Reading the entityID can throw if the server doesn't allow resuming.
|
||||
try {
|
||||
this._patch.setProperty("entityID", request.entityID);
|
||||
} catch (ex) {
|
||||
if (!(ex instanceof Components.Exception) ||
|
||||
ex.result != Cr.NS_ERROR_NOT_RESUMABLE) {
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var um = Cc["@mozilla.org/updates/update-manager;1"].
|
||||
|
|
Загрузка…
Ссылка в новой задаче