Bug 1472626 - Stop spamming favicon loading errors with HTTP failures to Browser Console. r=mossop

We already logs all HTTP messages. There is not point in spamming duplicate information.

Differential Revision: https://phabricator.services.mozilla.com/D137388
This commit is contained in:
Masatoshi Kimura 2022-02-04 13:27:16 +00:00
parent 175d6b758f
commit d46fcb69dc

View File

@ -252,7 +252,7 @@ class FaviconLoad {
this._deferred.reject(
Components.Exception(
`Favicon at "${this.icon.iconUri.spec}" failed to load: ${this.channel.responseStatusText}.`,
Cr.NS_ERROR_FAILURE
{ data: { httpStatus: this.channel.responseStatus } }
)
);
return;
@ -590,7 +590,9 @@ class IconLoader {
});
} catch (e) {
if (e.result != Cr.NS_BINDING_ABORTED) {
Cu.reportError(e);
if (typeof e.data?.wrappedJSObject?.httpStatus !== "number") {
Cu.reportError(e);
}
// Used mainly for tests currently.
this.actor.sendAsyncMessage("Link:SetFailedIcon", {