Bug 1173379 - Lazy-init console in browser-content.js; r=Mossop

This commit is contained in:
Jim Chen 2015-06-16 19:35:52 -04:00
parent 93e1c902b5
commit 29a6e5e809

View File

@ -354,9 +354,11 @@ let PopupBlocking = {
};
PopupBlocking.init();
// Set up console.* for frame scripts.
let Console = Components.utils.import("resource://gre/modules/devtools/Console.jsm", {});
this.console = new Console.ConsoleAPI();
XPCOMUtils.defineLazyGetter(this, "console", () => {
// Set up console.* for frame scripts.
let Console = Components.utils.import("resource://gre/modules/devtools/Console.jsm", {});
return new Console.ConsoleAPI();
});
let Printing = {
// Bug 1088061: nsPrintEngine's DoCommonPrint currently expects the