From b1e9ba2c558b3fc937a6b43e8e8b39bd7cfe5935 Mon Sep 17 00:00:00 2001 From: "timeless@mozdev.org" Date: Sat, 9 Jan 2010 08:32:00 -0800 Subject: [PATCH] Bug 538698 - crash [@nsCacheService::DoomEntry_Internal(nsCacheEntry*)] on shutdown, r=biesi --- netwerk/cache/src/nsCacheService.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netwerk/cache/src/nsCacheService.cpp b/netwerk/cache/src/nsCacheService.cpp index e5c55578b4e..ddafd09e2c6 100644 --- a/netwerk/cache/src/nsCacheService.cpp +++ b/netwerk/cache/src/nsCacheService.cpp @@ -1494,6 +1494,11 @@ void nsCacheService::OnProfileShutdown(PRBool cleanse) { if (!gService) return; + if (!gService->mInitialized) { + // The cache service has been shut down, but someone is still holding + // a reference to it. Ignore this call. + return; + } nsCacheServiceAutoLock lock; gService->DoomActiveEntries();