mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1654583 - Refactor SiteDataManager.jsm to not use principal.uri r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D82912
This commit is contained in:
parent
afd61504a3
commit
62263a0673
@ -147,9 +147,8 @@ var SiteDataManager = {
|
||||
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
|
||||
item.origin
|
||||
);
|
||||
let uri = principal.URI;
|
||||
if (uri.scheme == "http" || uri.scheme == "https") {
|
||||
let site = this._getOrInsertSite(uri.host);
|
||||
if (principal.schemeIs("http") || principal.schemeIs("https")) {
|
||||
let site = this._getOrInsertSite(principal.host);
|
||||
// Assume 3 sites:
|
||||
// - Site A (not persisted): https://www.foo.com
|
||||
// - Site B (not persisted): https://www.foo.com^userContextId=2
|
||||
@ -217,8 +216,7 @@ var SiteDataManager = {
|
||||
let principal = Services.scriptSecurityManager.createContentPrincipalFromOrigin(
|
||||
group
|
||||
);
|
||||
let uri = principal.URI;
|
||||
let site = this._getOrInsertSite(uri.host);
|
||||
let site = this._getOrInsertSite(principal.host);
|
||||
if (!site.principals.some(p => p.origin == principal.origin)) {
|
||||
site.principals.push(principal);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user