mirror of https://github.com/gorhill/uBlock.git
Fetch and cache cname of collated hostnames in page store
Related feedback: https://github.com/uBlockOrigin/uBlock-issues/discussions/3376
This commit is contained in:
parent
f936dfa648
commit
c265e849e0
|
@ -288,9 +288,8 @@ const getHostnameDict = function(hostnameDetailsMap, out) {
|
||||||
const cnMap = [];
|
const cnMap = [];
|
||||||
|
|
||||||
const createDictEntry = (domain, hostname, details) => {
|
const createDictEntry = (domain, hostname, details) => {
|
||||||
const cname = vAPI.net.canonicalNameFromHostname(hostname);
|
if ( details.cname ) {
|
||||||
if ( cname !== undefined ) {
|
cnMap.push([ details.cname, hostname ]);
|
||||||
cnMap.push([ cname, hostname ]);
|
|
||||||
}
|
}
|
||||||
hnDict[hostname] = { domain, counts: details.counts };
|
hnDict[hostname] = { domain, counts: details.counts };
|
||||||
};
|
};
|
||||||
|
|
|
@ -312,6 +312,7 @@ const HostnameDetails = class {
|
||||||
}
|
}
|
||||||
init(hostname) {
|
init(hostname) {
|
||||||
this.hostname = hostname;
|
this.hostname = hostname;
|
||||||
|
this.cname = vAPI.net.canonicalNameFromHostname(hostname);
|
||||||
this.counts.reset();
|
this.counts.reset();
|
||||||
}
|
}
|
||||||
dispose() {
|
dispose() {
|
||||||
|
|
Loading…
Reference in New Issue