Bug 746548 - Fix NPE for cache service in pause/resume. r=mfinkle a=blocking-fennec
This commit is contained in:
@@ -335,7 +335,8 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||
// If we are OOM killed with the disk cache enabled, the entire
|
||||
// cache will be cleared (bug 105843), so shut down the cache here
|
||||
// and re-init on resume
|
||||
nsCacheService::GlobalInstance()->Shutdown();
|
||||
if (nsCacheService::GlobalInstance())
|
||||
nsCacheService::GlobalInstance()->Shutdown();
|
||||
}
|
||||
|
||||
// We really want to send a notification like profile-before-change,
|
||||
@@ -467,7 +468,8 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||
// If we are OOM killed with the disk cache enabled, the entire
|
||||
// cache will be cleared (bug 105843), so shut down cache on pause
|
||||
// and re-init here
|
||||
nsCacheService::GlobalInstance()->Init();
|
||||
if (nsCacheService::GlobalInstance())
|
||||
nsCacheService::GlobalInstance()->Init();
|
||||
|
||||
// We didn't return from one of our own activities, so restore
|
||||
// to foreground status
|
||||
|
||||
Reference in New Issue
Block a user