Skip to content

Commit cfe2daf

Browse files
committed
Bug 942154 - Use normal console logging instead of debug(). r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D176322 UltraBlame original commit: 07112703f3aae05cb75a4628eeefb4a3948fb0d8
1 parent 6813001 commit cfe2daf

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

browser/components/sessionstore/ContentSessionStore.sys.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ import {
88
setTimeoutWithTarget,
99
} from "resource://gre/modules/Timer.sys.mjs";
1010

11-
function debug(msg) {
12-
Services.console.logStringMessage("SessionStoreContent: " + msg);
13-
}
14-
1511
const lazy = {};
1612

1713
ChromeUtils.defineESModuleGetters(lazy, {
@@ -372,7 +368,7 @@ class MessageQueue extends Handler {
372368
);
373369
break;
374370
default:
375-
debug("received unknown message '" + data + "'");
371+
console.error("received unknown message '" + data + "'");
376372
break;
377373
}
378374
}
@@ -570,7 +566,7 @@ export class ContentSessionStore {
570566
this.mm.docShell.persistLayoutHistoryState();
571567
break;
572568
default:
573-
debug("received unknown message '" + name + "'");
569+
console.error("received unknown message '" + name + "'");
574570
break;
575571
}
576572
}

toolkit/modules/sessionstore/SessionHistory.sys.mjs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
88
E10SUtils: "resource://gre/modules/E10SUtils.sys.mjs",
99
});
1010

11-
function debug(msg) {
12-
Services.console.logStringMessage("SessionHistory: " + msg);
13-
}
14-
1511
/**
1612
* The external API exported by this module.
1713
*/
@@ -564,7 +560,7 @@ var SessionHistoryInternal = {
564560
// and this ensures we always have a principal returned from this function.
565561
// We must always have a triggering principal for a load to work.
566562
// A null principal won't always work however is safe to use.
567-
debug(
563+
console.warn(
568564
"Couldn't deserialize the triggeringPrincipal, falling back to NullPrincipal"
569565
);
570566
return Services.scriptSecurityManager.createNullPrincipal({});

0 commit comments

Comments
 (0)