testing chrome vs remote privileges
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Nov 2005 17:21:59 +0000 (17:21 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 1 Nov 2005 17:21:59 +0000 (17:21 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@1931 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/evergreen/util/error.js

index 9f30733..4e8ee6e 100644 (file)
@@ -3,8 +3,14 @@ dump('entering util/error.js\n');
 if (typeof util == 'undefined') util = {};
 util.error = function () {
 
-       this.consoleService = Components.classes['@mozilla.org/consoleservice;1']
-               .getService(Components.interfaces.nsIConsoleService);
+       try {
+               netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+               this.consoleService = Components.classes['@mozilla.org/consoleservice;1']
+                       .getService(Components.interfaces.nsIConsoleService);
+       } catch(E) {
+               this.consoleDump = false;
+               dump('util.error constructor: ' + E + '\n');
+       }
 
        this.sdump_last_time = new Date();