зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1613629 - Show extra DNS flags in about:networking#dns r=nhnt11,fluent-reviewers,flod
The DNS cache will have a bunch of extra keys we use to separate entries in the hashtable. If these flags are not displayed in about:networking it will appear as though we have multiple entries for the same key in the cache, which is not true. They will differ based on these extra flags/keys. Differential Revision: https://phabricator.services.mozilla.com/D128888
This commit is contained in:
Родитель
9ec6b27649
Коммит
59ecb94eef
|
@ -67,6 +67,7 @@ dictionary DnsCacheEntry {
|
|||
double expiration = 0;
|
||||
boolean trr = false;
|
||||
DOMString originAttributesSuffix = "";
|
||||
DOMString flags = "";
|
||||
};
|
||||
|
||||
[GenerateConversionToJS]
|
||||
|
|
|
@ -913,6 +913,7 @@ nsresult Dashboard::GetDNSCacheEntries(DnsData* dnsData) {
|
|||
|
||||
entry.mOriginAttributesSuffix =
|
||||
NS_ConvertUTF8toUTF16(dnsData->mData[i].originAttributesSuffix);
|
||||
entry.mFlags = NS_ConvertUTF8toUTF16(dnsData->mData[i].flags);
|
||||
}
|
||||
|
||||
JS::RootedValue val(cx);
|
||||
|
|
|
@ -40,6 +40,7 @@ struct DNSCacheEntries {
|
|||
nsCString netInterface;
|
||||
bool TRR;
|
||||
nsCString originAttributesSuffix;
|
||||
nsCString flags;
|
||||
};
|
||||
|
||||
struct HttpConnInfo {
|
||||
|
|
|
@ -1773,6 +1773,8 @@ void nsHostResolver::GetDNSCacheEntries(nsTArray<DNSCacheEntries>* args) {
|
|||
}
|
||||
|
||||
info.originAttributesSuffix = recordEntry.GetKey().originSuffix;
|
||||
info.flags = nsPrintfCString("%u|0x%x|%u|%d|%s", rec->type, rec->flags,
|
||||
rec->af, rec->pb, rec->mTrrServer.get());
|
||||
|
||||
args->AppendElement(std::move(info));
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@
|
|||
<th data-l10n-id="about-networking-addresses"></th>
|
||||
<th data-l10n-id="about-networking-expires"></th>
|
||||
<th data-l10n-id="about-networking-originAttributesSuffix"></th>
|
||||
<th data-l10n-id="about-networking-flags"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="dns_content"></tbody>
|
||||
|
|
|
@ -136,6 +136,7 @@ function displayDns(data) {
|
|||
row.appendChild(column);
|
||||
row.appendChild(col(data.entries[i].expiration));
|
||||
row.appendChild(col(data.entries[i].originAttributesSuffix));
|
||||
row.appendChild(col(data.entries[i].flags));
|
||||
new_cont.appendChild(row);
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@ about-networking-trr = TRR
|
|||
about-networking-addresses = Addresses
|
||||
about-networking-expires = Expires (Seconds)
|
||||
about-networking-originAttributesSuffix = Isolation Key
|
||||
about-networking-flags = Extra flags
|
||||
about-networking-messages-sent = Messages Sent
|
||||
about-networking-messages-received = Messages Received
|
||||
about-networking-bytes-sent = Bytes Sent
|
||||
|
|
Загрузка…
Ссылка в новой задаче