Bug 1803342 - Automatically replace Cu.reportError with console.error (testing). r=perftest-reviewers,sparky

Depends on D163455

Differential Revision: https://phabricator.services.mozilla.com/D163456
This commit is contained in:
Mark Banner 2022-12-01 16:29:01 +00:00
Родитель 7837d8d2cf
Коммит c20944ef61
8 изменённых файлов: 9 добавлений и 10 удалений

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

@ -233,7 +233,6 @@ module.exports = {
"layout/base/tests/chrome/**",
"mobile/android/**",
"security/manager/ssl/tests/mochitest/mixedcontent/test_bug383369.html",
"testing/**",
"toolkit/**",
"uriloader/exthandler/**",
],

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

@ -7,7 +7,7 @@ function e10s_init() {
"oop-browser-crashed",
event => {
let uri = event.target.currentURI;
Cu.reportError(
console.error(
"remote browser crashed while on " +
(uri ? uri.spec : "<unknown>") +
"\n"

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

@ -224,7 +224,7 @@ export class SpecialPowersChild extends JSWindowActorChild {
listener.receiveMessage(message);
}
} catch (e) {
Cu.reportError(e);
console.error(e);
}
}
}
@ -1673,7 +1673,7 @@ export class SpecialPowersChild extends JSWindowActorChild {
: this;
actor.sendAsyncMessage("SpecialPowers.Focus", {});
} catch (e) {
Cu.reportError(e);
console.error(e);
}
}
@ -1918,7 +1918,7 @@ export class SpecialPowersChild extends JSWindowActorChild {
try {
listener(msg);
} catch (e) {
Cu.reportError(e);
console.error(e);
}
}
});

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

@ -799,7 +799,7 @@ export class SpecialPowersParent extends JSWindowActorParent {
await Promise.all(promises);
return filePaths;
})().catch(e => {
Cu.reportError(e);
console.error(e);
return Promise.reject(String(e));
});

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

@ -161,7 +161,7 @@ var Profiler;
});
},
error => {
Cu.reportError("Failed to gather profile: " + error);
console.error("Failed to gather profile: " + error);
reject();
}
);

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

@ -157,7 +157,7 @@ TalosPowersService.prototype = {
Services.obs.notifyObservers(null, "talos-profile-gathered");
}),
error => {
Cu.reportError("Failed to gather profile: " + error);
console.error("Failed to gather profile: " + error);
// FIXME: We should probably send a message down to the
// child which causes it to reject the waiting Promise.
reject();

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

@ -102,7 +102,7 @@ this.tart = class extends ExtensionAPI {
break;
default:
Cu.reportError(`Unknown TART command ${command.name}\n`);
console.error(`Unknown TART command ${command.name}\n`);
break;
}
}

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

@ -7,7 +7,7 @@
TART_PREFIX + "chrome-exec-event",
function(e) {
if (!content.location.pathname.endsWith("tart.html")) {
Cu.reportError(
console.error(
`Ignore chrome-exec-event on non-tart page ${content.location.href}`
);
return;