Bug 1333532 - Changed the permissions.js file to make the Page Info dialog work. r?johannh draft
authorPrathiksha <prathikshaprasadsuman@gmail.com>
Sun, 09 Apr 2017 16:50:02 +0530
changeset 559278 a345e462bc12c72d06c7f5a3ab05dee95ae3149e
parent 559154 2a3ecdb7d1ea814708021fee6735b3aedcf03e48
child 623344 1496504ecb99f5836ca2ae2999212bfc327e8480
push id53038
push userbmo:prathikshaprasadsuman@gmail.com
push dateSun, 09 Apr 2017 11:20:29 +0000
reviewersjohannh
bugs1333532
milestone55.0a1
Bug 1333532 - Changed the permissions.js file to make the Page Info dialog work. r?johannh MozReview-Commit-ID: 2zJeMhtYEds
browser/base/content/pageinfo/permissions.js
--- a/browser/base/content/pageinfo/permissions.js
+++ b/browser/base/content/pageinfo/permissions.js
@@ -176,16 +176,21 @@ function onRadioClick(aPartId) {
 function setRadioState(aPartId, aValue) {
   var radio = document.getElementById(aPartId + "#" + aValue);
   if (radio) {
     radio.radioGroup.selectedItem = radio;
   }
 }
 
 function initIndexedDBRow() {
+  // IndexedDB information is not shown for pages with a null principal
+  // such as sandboxed pages because these pages do not have access to indexedDB.
+  if (gPermPrincipal.isNullPrincipal)
+    return;
+
   let row = document.getElementById("perm-indexedDB-row");
   let extras = document.getElementById("perm-indexedDB-extras");
 
   row.appendChild(extras);
 
   var quotaManagerService =
     Components.classes["@mozilla.org/dom/quota-manager-service;1"]
               .getService(nsIQuotaManagerService);