зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1633710 - Move js uri.schemeIs to principal r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D73241
This commit is contained in:
Родитель
b70610980a
Коммит
e4aab60ae4
|
@ -1970,12 +1970,13 @@ BrowserGlue.prototype = {
|
|||
|
||||
let exceptions = 0;
|
||||
for (let permission of Services.perms.all) {
|
||||
let uri = permission.principal.URI;
|
||||
// We consider just permissions set for http, https and file URLs.
|
||||
if (
|
||||
permission.type == "cookie" &&
|
||||
permission.capability == Ci.nsICookiePermission.ACCESS_SESSION &&
|
||||
(uri.scheme == "http" || uri.scheme == "https" || uri.scheme == "file")
|
||||
["http", "https", "file"].some(scheme =>
|
||||
permission.principal.schemeIs(scheme)
|
||||
)
|
||||
) {
|
||||
exceptions++;
|
||||
}
|
||||
|
|
|
@ -853,7 +853,7 @@ XRPermissionPrompt.prototype = {
|
|||
name: this.getPrincipalName(),
|
||||
};
|
||||
|
||||
if (this.principal.URI.schemeIs("file")) {
|
||||
if (this.principal.schemeIs("file")) {
|
||||
options.checkbox = { show: false };
|
||||
} else {
|
||||
// Don't offer "always remember" action in PB mode
|
||||
|
@ -878,7 +878,7 @@ XRPermissionPrompt.prototype = {
|
|||
},
|
||||
|
||||
get message() {
|
||||
if (this.principal.URI.schemeIs("file")) {
|
||||
if (this.principal.schemeIs("file")) {
|
||||
return gBrowserBundle.GetStringFromName("xr.shareWithFile3");
|
||||
}
|
||||
|
||||
|
|
|
@ -482,7 +482,7 @@ var SiteDataManager = {
|
|||
for (let perm of perms) {
|
||||
// Specialcase local file permissions.
|
||||
if (!host) {
|
||||
if (perm.principal.URI.schemeIs("file")) {
|
||||
if (perm.principal.schemeIs("file")) {
|
||||
Services.perms.removePermission(perm);
|
||||
}
|
||||
} else if (Services.eTLD.hasRootDomain(perm.principal.URI.host, host)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче