Bug 402631 - "Need to clear all images on memory-pressure notification" [p=stuart r+aM9=vlad]
git-svn-id: svn://10.0.0.236/trunk@238572 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -346,10 +346,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);
|
||||
ClearCache(PR_TRUE);
|
||||
|
||||
} else if (strcmp(aTopic, "chrome-flush-skin-caches") == 0 ||
|
||||
strcmp(aTopic, "chrome-flush-caches") == 0) {
|
||||
ClearCache(PR_TRUE);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user