forked from mirrors/gecko-dev
Bug 1803914 - Automatically replace Cu.reportError with console.error (misc). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D163772
This commit is contained in:
parent
9f4b707f11
commit
ff47c36f9b
10 changed files with 11 additions and 16 deletions
|
|
@ -226,11 +226,6 @@ module.exports = {
|
|||
"dom/serviceworkers/test/browser_download.js",
|
||||
"dom/system/NetworkGeolocationProvider.*",
|
||||
"dom/tests/browser/browser_hasbeforeunload.js",
|
||||
"editor/AsyncSpellCheckTestHelper.*",
|
||||
"intl/locale/LangPackMatcher.sys.mjs",
|
||||
"js/xpconnect/loader/XPCOMUtils.sys.mjs",
|
||||
"layout/base/tests/chrome/**",
|
||||
"security/manager/ssl/tests/mochitest/mixedcontent/test_bug383369.html",
|
||||
"toolkit/**",
|
||||
"uriloader/exthandler/**",
|
||||
],
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ function maybeOnSpellCheck(editableElement, callback) {
|
|||
? SPELL_CHECK_ENDED_TOPIC
|
||||
: SPELL_CHECK_STARTED_TOPIC;
|
||||
if (topic != expectedTopic) {
|
||||
Cu.reportError("Expected " + expectedTopic + " but got " + topic + "!");
|
||||
console.error("Expected " + expectedTopic + " but got " + topic + "!");
|
||||
}
|
||||
waitingForEnded = !waitingForEnded;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ const mockable = {
|
|||
try {
|
||||
return lazy.AddonRepository.getAvailableLangpacks();
|
||||
} catch (error) {
|
||||
Cu.reportError(
|
||||
console.error(
|
||||
`Failed to get the list of available language packs: ${error?.message}`
|
||||
);
|
||||
return null;
|
||||
|
|
@ -169,14 +169,14 @@ const mockable = {
|
|||
},
|
||||
});
|
||||
} catch (error) {
|
||||
Cu.reportError(error);
|
||||
console.error(error);
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
await install.install();
|
||||
} catch (error) {
|
||||
Cu.reportError(error);
|
||||
console.error(error);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ export var XPCOMUtils = {
|
|||
aPostLambda.apply(proxy);
|
||||
}
|
||||
} catch (ex) {
|
||||
Cu.reportError("Failed to load module " + aResource + ".");
|
||||
console.error("Failed to load module " + aResource + ".");
|
||||
throw ex;
|
||||
}
|
||||
return temp[aSymbol || aName];
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ async function run() {
|
|||
ok(true, "Retrieved printer basic attributes successfully.");
|
||||
} catch (e) {
|
||||
ok(false, `Error thrown while retrieving printer basic attributes: ${e}.`);
|
||||
Cu.reportError(e);
|
||||
console.error(e);
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ async function run() {
|
|||
ok(true, "Finished traversing printers.");
|
||||
} catch (e) {
|
||||
ok(false, `Error thrown while retrieving printer info: ${e}.`);
|
||||
Cu.reportError(e);
|
||||
console.error(e);
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ async function run() {
|
|||
}
|
||||
} catch (e) {
|
||||
ok(false, `Shouldn't throw: ${e}`);
|
||||
Cu.reportError(e);
|
||||
console.error(e);
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ async function run() {
|
|||
}
|
||||
} catch (e) {
|
||||
ok(false, `Shouldn't throw: ${e}`);
|
||||
Cu.reportError(e);
|
||||
console.error(e);
|
||||
}
|
||||
SimpleTest.finish();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ module.exports = {
|
|||
"no-case-declarations": "error",
|
||||
|
||||
// Disallow use of the console API.
|
||||
"no-console": "error",
|
||||
"no-console": ["error", { allow: ["error"] }],
|
||||
|
||||
// Disallow constant expressions in conditions (except for loops).
|
||||
"no-constant-condition": ["error", { checkLoops: false }],
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
},
|
||||
});
|
||||
sendAsyncMessage("navigate", "download.auto");
|
||||
}).catch(Cu.reportError);
|
||||
}).catch(console.error);
|
||||
});
|
||||
script.addMessageListener("navigate", function(url) {
|
||||
window.location = url;
|
||||
|
|
|
|||
Loading…
Reference in a new issue