mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
Issue #2652 - Part 1: Add a way to programmatically clear the DNS cache.
This commit is contained in:
parent
1f038cd026
commit
f5ef327563
3 changed files with 18 additions and 0 deletions
|
|
@ -202,6 +202,13 @@ ChildDNSService::GetDNSCacheEntries(nsTArray<mozilla::net::DNSCacheEntries> *arg
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
ChildDNSService::ClearCache()
|
||||||
|
{
|
||||||
|
// Not available in IPC children.
|
||||||
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
|
}
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
ChildDNSService::GetMyHostName(nsACString &result)
|
ChildDNSService::GetMyHostName(nsACString &result)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1052,6 +1052,12 @@ nsDNSService::GetDNSCacheEntries(nsTArray<mozilla::net::DNSCacheEntries> *args)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
nsDNSService::ClearCache() {
|
||||||
|
mResolver->FlushCache();
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
nsDNSService::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
nsDNSService::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,11 @@ interface nsIDNSService : nsISupports
|
||||||
*/
|
*/
|
||||||
[noscript] void getDNSCacheEntries(in EntriesArray args);
|
[noscript] void getDNSCacheEntries(in EntriesArray args);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the DNS cache.
|
||||||
|
*/
|
||||||
|
void clearCache();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the hostname of the operating system.
|
* @return the hostname of the operating system.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue