From e004668572507242cf305ec0ef361b95a976b834 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 5 Jan 2009 21:53:55 +1100 Subject: [PATCH] Access the console service via the services cache in liberator.log. --- common/content/liberator.js | 3 +-- common/content/style.js | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/common/content/liberator.js b/common/content/liberator.js index a8b3ed6e..80a44830 100644 --- a/common/content/liberator.js +++ b/common/content/liberator.js @@ -1056,8 +1056,7 @@ const liberator = (function () //{{{ if (typeof msg == "object") msg = util.objectToString(msg, false); - const consoleService = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService); - consoleService.logStringMessage(config.name.toLowerCase() + ": " + msg); + services.get("console").logStringMessage(config.name.toLowerCase() + ": " + msg); }, /** diff --git a/common/content/style.js b/common/content/style.js index d99ee8eb..6da2d5c3 100644 --- a/common/content/style.js +++ b/common/content/style.js @@ -252,7 +252,6 @@ function Styles(name, store, serial) const util = modules.util; const sleep = liberator.sleep; const storage = modules.storage; - const consoleService = Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService); const ios = services.get("io"); const sss = Cc["@mozilla.org/content/style-sheet-service;1"].getService(Ci.nsIStyleSheetService); const namespace = '@namespace html "' + XHTML + '";\n' +