mirror of
https://github.com/roytam1/basilisk55.git
synced 2026-05-26 15:02:46 +00:00
import from UXP: Issue #2652 - Part 1: Add a way to programmatically clear the DNS cache. (f5ef3275)
This commit is contained in:
@@ -202,6 +202,13 @@ ChildDNSService::GetDNSCacheEntries(nsTArray<mozilla::net::DNSCacheEntries> *arg
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ChildDNSService::ClearCache()
|
||||
{
|
||||
// Not available in IPC children.
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
ChildDNSService::GetMyHostName(nsACString &result)
|
||||
{
|
||||
|
||||
@@ -1053,6 +1053,12 @@ nsDNSService::GetDNSCacheEntries(nsTArray<mozilla::net::DNSCacheEntries> *args)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDNSService::ClearCache() {
|
||||
mResolver->FlushCache();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
size_t
|
||||
nsDNSService::SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf) const
|
||||
{
|
||||
|
||||
@@ -115,6 +115,11 @@ interface nsIDNSService : nsISupports
|
||||
*/
|
||||
[noscript] void getDNSCacheEntries(in EntriesArray args);
|
||||
|
||||
/**
|
||||
* Clears the DNS cache.
|
||||
*/
|
||||
void clearCache();
|
||||
|
||||
/**
|
||||
* @return the hostname of the operating system.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user