зеркало из https://github.com/mozilla/gecko-dev.git
Bug 968689 - Netd BandwidthController sets costlyAlert to invalid quota. r=vchang
This commit is contained in:
Родитель
75ef6cdec5
Коммит
79f9376708
|
@ -169,12 +169,19 @@ NetworkService.prototype = {
|
|||
return;
|
||||
}
|
||||
|
||||
if (threshold < 0) {
|
||||
this._disableNetworkInterfaceAlarm(networkName, callback);
|
||||
return;
|
||||
}
|
||||
let self = this;
|
||||
this._disableNetworkInterfaceAlarm(networkName, function(result) {
|
||||
if (threshold < 0) {
|
||||
if (!isError(result.resultCode)) {
|
||||
callback.networkUsageAlarmResult(null);
|
||||
return;
|
||||
}
|
||||
callback.networkUsageAlarmResult(result.reason);
|
||||
return
|
||||
}
|
||||
|
||||
this._setNetworkInterfaceAlarm(networkName, threshold, callback);
|
||||
self._setNetworkInterfaceAlarm(networkName, threshold, callback);
|
||||
});
|
||||
},
|
||||
|
||||
_setNetworkInterfaceAlarm: function(networkName, threshold, callback) {
|
||||
|
@ -232,11 +239,7 @@ NetworkService.prototype = {
|
|||
params.isAsync = true;
|
||||
|
||||
this.controlMessage(params, function(result) {
|
||||
if (!isError(result.resultCode)) {
|
||||
callback.networkUsageAlarmResult(null);
|
||||
return;
|
||||
}
|
||||
callback.networkUsageAlarmResult(result.reason);
|
||||
callback(result);
|
||||
});
|
||||
},
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче