Bug 1536653 - browser/ manual ESLint no-throw-literal fixes. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D24111

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ian Moody 2019-03-20 10:15:03 +00:00
Родитель 67fb55f3b9
Коммит 7f284be66e
3 изменённых файлов: 4 добавлений и 13 удалений

Просмотреть файл

@ -55,17 +55,6 @@ module.exports = {
}, {
// TODO: Bug 1246594. Empty this list once the rule has landed for all dirs
"files": [
"browser/actors/ContextMenuChild.jsm",
"browser/base/content/**",
"browser/components/customizableui/**",
"browser/components/enterprisepolicies/Policies.jsm",
"browser/components/places/content/**",
"browser/components/preferences/**",
"browser/components/privatebrowsing/test/browser/browser_privatebrowsing_cache.js",
"browser/components/urlbar/tests/browser/head-common.js",
"browser/extensions/fxmonitor/privileged/FirefoxMonitor.jsm",
"browser/modules/**",
"browser/tools/mozscreenshots/mozscreenshots/extension/TestRunner.jsm",
"docshell/test/chrome/docshell_helpers.js",
"docshell/test/navigation/NavigationUtils.js",
"dom/asmjscache/test/**",

Просмотреть файл

@ -32,7 +32,7 @@ function getStorageEntryCount(device, goon) {
storage = Services.cache2.diskCacheStorage(Services.loadContextInfo.default, false);
break;
default:
throw "Unknown device " + device + " at getStorageEntryCount";
throw new Error(`Unknown device ${device} at getStorageEntryCount`);
}
var visitor = {

Просмотреть файл

@ -395,7 +395,9 @@ var TestRunner = {
let browserWindow = Services.wm.getMostRecentWindow("navigator:browser");
await this._cropImage(browserWindow, OS.Path.toFileURI(imagePath), bounds, rects, imagePath).catch((msg) => {
throw `Cropping combo [${combo.map((e) => e.name).join(", ")}] failed: ${msg}`;
throw new Error(
`Cropping combo [${combo.map((e) => e.name).join(", ")}] failed: ${msg}`
);
});
this.completedCombos++;
this.mochitestScope.info("_onConfigurationReady");