Bug 715588 - talos has enablePrivilege. fix xul with no specialpowers. r=jhammel
authorJoel Maher <jmaher@mozilla.com>
Fri, 29 Jun 2012 12:09:25 -0400
changeset 474 4c23320b480a80cff7c39d63a01eb081a33759bb
parent 473 ef760c9dbc3689cf9879efc0d4985f34ac1674d2
child 475 3607fcd7ce14bae8e18fb549c8c9a114cb63136d
push id222
push userjmaher@mozilla.com
push dateFri, 29 Jun 2012 16:09:48 +0000
reviewersjhammel
bugs715588
Bug 715588 - talos has enablePrivilege. fix xul with no specialpowers. r=jhammel
talos/getInfo.html
--- a/talos/getInfo.html
+++ b/talos/getInfo.html
@@ -14,19 +14,21 @@
     var verison;
     var buildid;
 
     if (!useSpecialPowers) {
       try {
         netscape.security.PrivilegeManager.enablePrivilege('UniversalPreferencesRead UniversalPreferencesWrite UniversalXPConnect');
         var appInfo = Components.classes['@mozilla.org/xre/app-info;1']
                                 .getService(Components.interfaces.nsIXULAppInfo);
-        id = appInfo.ID;
+
+        //NOTE: version and buildid work fine, but appInfo.ID throws an exception on XUL Fennec, so we need to do that last.
         version = appInfo.Version;
         buildid = appInfo.appBuildID;
+        id = appInfo.ID;
       } catch(err) {
           dumpLog('exception getting privileged access, defaulting to XUL_FENNEC');
           id = '{a23983c0-fd0e-11dc-95ff-0800200c9a66}';
       }
     } else {
       id = SpecialPowers.ID;
       if (id == null) {
           id = '{a23983c0-fd0e-11dc-95ff-0800200c9a66}';