mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
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 createDictEntry = (domain, hostname, details) => {
|
||||
const cname = vAPI.net.canonicalNameFromHostname(hostname);
|
||||
if ( cname !== undefined ) {
|
||||
cnMap.push([ cname, hostname ]);
|
||||
if ( details.cname ) {
|
||||
cnMap.push([ details.cname, hostname ]);
|
||||
}
|
||||
hnDict[hostname] = { domain, counts: details.counts };
|
||||
};
|
||||
|
@ -312,6 +312,7 @@ const HostnameDetails = class {
|
||||
}
|
||||
init(hostname) {
|
||||
this.hostname = hostname;
|
||||
this.cname = vAPI.net.canonicalNameFromHostname(hostname);
|
||||
this.counts.reset();
|
||||
}
|
||||
dispose() {
|
||||
|
Loading…
Reference in New Issue
Block a user