Bug 1287408 - Restor accidentally removed code for auto-allowing persisted permissions. r=dale
authorDão Gottwald <dao@mozilla.com>
Thu, 21 Jul 2016 17:23:13 +0200
changeset 306225 8c5a29a4fc59ed860f2ba6eac9971867e6ce4659
parent 306224 f5154aaeaec4546dd04c66ac61a0d0ee69f4dfdf
child 306226 4b83d342c9f79da4ec067392a1d5ed97e0edd683
push id79800
push usercbook@mozilla.com
push dateFri, 22 Jul 2016 10:17:37 +0000
treeherdermozilla-inbound@30745bed2567 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdale
bugs1287408
milestone50.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 1287408 - Restor accidentally removed code for auto-allowing persisted permissions. r=dale
browser/components/nsBrowserGlue.js
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -2786,27 +2786,27 @@ ContentPermissionPrompt.prototype = {
 
     var requestingPrincipal = request.principal;
     var requestingURI = requestingPrincipal.URI;
 
     // Ignore requests from non-nsIStandardURLs
     if (!(requestingURI instanceof Ci.nsIStandardURL))
       return;
 
-    var autoAllow = false;
     var permissionKey = kFeatureKeys[perm.type];
     var result = Services.perms.testExactPermissionFromPrincipal(requestingPrincipal, permissionKey);
 
     if (result == Ci.nsIPermissionManager.DENY_ACTION) {
       request.cancel();
       return;
     }
 
     if (result == Ci.nsIPermissionManager.ALLOW_ACTION) {
-      autoAllow = true;
+      request.allow();
+      return;
     }
 
     var browser = this._getBrowserForRequest(request);
     var chromeWin = browser.ownerGlobal;
     if (!chromeWin.PopupNotifications)
       // Ignore requests from browsers hosted in windows that don't support
       // PopupNotifications.
       return;