diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-26 10:38:41 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-26 10:38:41 +0200 |
commit | 94d59b4ebcf3b0745b86cac896e92ac3227aa428 (patch) | |
tree | 235aef746f40c90b524dec8516b1f96e37191cb0 /application/palemoon/base/content/browser-plugins.js | |
parent | 2703a13f12a878395806e7381e825d01c1537d8c (diff) | |
download | UXP-94d59b4ebcf3b0745b86cac896e92ac3227aa428.tar UXP-94d59b4ebcf3b0745b86cac896e92ac3227aa428.tar.gz UXP-94d59b4ebcf3b0745b86cac896e92ac3227aa428.tar.lz UXP-94d59b4ebcf3b0745b86cac896e92ac3227aa428.tar.xz UXP-94d59b4ebcf3b0745b86cac896e92ac3227aa428.zip |
Bug 1173523 - Part 3: Update PluginContent to use new API for nsIPermission
Diffstat (limited to 'application/palemoon/base/content/browser-plugins.js')
-rw-r--r-- | application/palemoon/base/content/browser-plugins.js | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/application/palemoon/base/content/browser-plugins.js b/application/palemoon/base/content/browser-plugins.js index 769ac6d8a..838268203 100644 --- a/application/palemoon/base/content/browser-plugins.js +++ b/application/palemoon/base/content/browser-plugins.js @@ -470,28 +470,12 @@ var gPluginHandler = { } }, - // Match the behaviour of nsPermissionManager - _getHostFromPrincipal: function PH_getHostFromPrincipal(principal) { - if (!principal.URI || principal.URI.schemeIs("moz-nullprincipal")) { - return "(null)"; - } - - try { - if (principal.URI.host) - return principal.URI.host; - } catch (e) {} - - return principal.origin; - }, - _makeCenterActions: function PH_makeCenterActions(notification) { let contentWindow = notification.browser.contentWindow; let cwu = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); let principal = contentWindow.document.nodePrincipal; - // This matches the behavior of nsPermssionManager, used for display purposes only - let principalHost = this._getHostFromPrincipal(principal); let centerActions = []; let pluginsFound = new Set(); @@ -517,11 +501,11 @@ var gPluginHandler = { let permissionObj = Services.perms. getPermissionObject(principal, pluginInfo.permissionString, false); if (permissionObj) { - pluginInfo.pluginPermissionHost = permissionObj.host; + pluginInfo.pluginPermissionPrePath = permissionObj.principal.originNoSuffix; pluginInfo.pluginPermissionType = permissionObj.expireType; } else { - pluginInfo.pluginPermissionHost = principalHost; + pluginInfo.pluginPermissionPrePath = principal.originNoSuffix; pluginInfo.pluginPermissionType = undefined; } |