mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 268798. fixes not flushing session cache during a memory-pressure notification. r=pavlov, sr=dbaron, a=benjamin
This commit is contained in:
parent
cb1033c179
commit
8d1d39bf6c
@ -344,10 +344,12 @@ PRBool imgCache::Remove(nsIURI *aKey)
|
||||
NS_IMETHODIMP
|
||||
imgCache::Observe(nsISupports* aSubject, const char* aTopic, const PRUnichar* aSomeData)
|
||||
{
|
||||
if (strcmp(aTopic, "memory-pressure") == 0 ||
|
||||
strcmp(aTopic, "chrome-flush-skin-caches") == 0 ||
|
||||
strcmp(aTopic, "chrome-flush-caches") == 0)
|
||||
if (strcmp(aTopic, "memory-pressure") == 0) {
|
||||
ClearCache(PR_FALSE);
|
||||
}
|
||||
else if (strcmp(aTopic, "chrome-flush-skin-caches") == 0 ||
|
||||
strcmp(aTopic, "chrome-flush-caches") == 0) {
|
||||
ClearCache(PR_TRUE);
|
||||
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user