Bug 655869 - Permissions tab assumes all consumers use testPermission. r=gavin
authorMargaret Leibovic <margaret.leibovic@gmail.com>
Tue, 06 Sep 2011 13:51:11 -0700
changeset 78261 d287051139f45fa64d2bcc3f0bade4669bdada80
parent 78260 8ef08b003e21acccdc421a590a50173023d14536
child 78262 1f8902ba7731616990ae200cca4912faef16b6f2
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs655869
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 655869 - Permissions tab assumes all consumers use testPermission. r=gavin
browser/base/content/pageinfo/permissions.js
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -133,17 +133,19 @@ function onUnloadPermission()
 
 function initRow(aPartId)
 {
   var permissionManager = Components.classes[PERMISSION_CONTRACTID]
                                     .getService(nsIPermissionManager);
 
   var checkbox = document.getElementById(aPartId + "Def");
   var command  = document.getElementById("cmd_" + aPartId + "Toggle");
-  var perm = permissionManager.testPermission(gPermURI, aPartId);
+  // Geolocation permission consumers use testExactPermission, not testPermission. 
+  var perm = aPartId == "geo" ? permissionManager.testExactPermission(gPermURI, aPartId) :
+                                permissionManager.testPermission(gPermURI, aPartId);
   if (perm) {
     checkbox.checked = false;
     command.removeAttribute("disabled");
   }
   else {
     checkbox.checked = true;
     command.setAttribute("disabled", "true");
     perm = gPermObj[aPartId]();