зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328802 - Enable the no-unsafe-finally rule for eslint and fix the four errors that are triggered by it by moving the control flow statement outside of the finally block. r=mossop
MozReview-Commit-ID: 7UFBBpvptdd --HG-- extra : rebase_source : b31f86341571ec6928caea130597e6c918a34636
This commit is contained in:
Родитель
6d7634cec1
Коммит
60b5555bc2
|
@ -1151,8 +1151,8 @@ var gHistorySwipeAnimation = {
|
|||
};
|
||||
} finally {
|
||||
img.src = url;
|
||||
return img;
|
||||
}
|
||||
return img;
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
@ -171,6 +171,9 @@ module.exports = {
|
|||
// No unreachable statements
|
||||
"no-unreachable": "error",
|
||||
|
||||
// Disallow control flow statements in finally blocks
|
||||
"no-unsafe-finally": "error",
|
||||
|
||||
// Disallow negating the left operand of relational operators
|
||||
"no-unsafe-negation": "error",
|
||||
|
||||
|
|
|
@ -1521,8 +1521,8 @@ var TelemetryStorageImpl = {
|
|||
Telemetry.getHistogramById("TELEMETRY_DISCARDED_PENDING_PINGS_SIZE_MB")
|
||||
.add(Math.floor(info.size / 1024 / 1024));
|
||||
Telemetry.getHistogramById("TELEMETRY_PING_SIZE_EXCEEDED_PENDING").add();
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
let id = OS.Path.basename(file.path);
|
||||
|
|
|
@ -84,7 +84,7 @@ var WindowsRegistry = {
|
|||
} catch (ex) {
|
||||
} finally {
|
||||
registry.close();
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -312,8 +312,8 @@ GMPWrapper.prototype = {
|
|||
throw e;
|
||||
} finally {
|
||||
this._updateTask = null;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}.bind(this));
|
||||
|
||||
return this._updateTask;
|
||||
|
|
Загрузка…
Ссылка в новой задаче