diff --git a/netwerk/cache/nsCacheService.cpp b/netwerk/cache/nsCacheService.cpp index d6c2526c9a7..cef42500fb8 100644 --- a/netwerk/cache/nsCacheService.cpp +++ b/netwerk/cache/nsCacheService.cpp @@ -109,7 +109,7 @@ static const char * observerList[] = { "profile-before-change", - "profile-after-change", + "profile-do-change", NS_XPCOM_SHUTDOWN_OBSERVER_ID, NS_PRIVATE_BROWSING_SWITCH_TOPIC }; @@ -364,7 +364,7 @@ nsCacheProfilePrefObserver::Observe(nsISupports * subject, nsCacheService::OnProfileShutdown(!strcmp("shutdown-cleanse", data.get())); - } else if (!strcmp("profile-after-change", topic)) { + } else if (!strcmp("profile-do-change", topic)) { // profile after change mHaveProfile = PR_TRUE; nsCOMPtr branch = do_GetService(NS_PREFSERVICE_CONTRACTID); diff --git a/netwerk/cache/nsDiskCache.h b/netwerk/cache/nsDiskCache.h index 7983acd4386..7d2b0bcfb51 100644 --- a/netwerk/cache/nsDiskCache.h +++ b/netwerk/cache/nsDiskCache.h @@ -53,7 +53,7 @@ class nsDiskCache { public: enum { - kCurrentVersion = 0x0001000D // format = 16 bits major version/16 bits minor version + kCurrentVersion = 0x0001000E // format = 16 bits major version/16 bits minor version }; enum { kData, kMetaData }; diff --git a/netwerk/cache/nsDiskCacheDevice.cpp b/netwerk/cache/nsDiskCacheDevice.cpp index 10e6096696f..1a5e922057a 100644 --- a/netwerk/cache/nsDiskCacheDevice.cpp +++ b/netwerk/cache/nsDiskCacheDevice.cpp @@ -368,7 +368,10 @@ nsDiskCacheDevice::Init() nsresult rv; - NS_ENSURE_TRUE(!Initialized(), NS_ERROR_FAILURE); + if (Initialized()) { + NS_ERROR("Disk cache already initialized!"); + return NS_ERROR_UNEXPECTED; + } if (!mCacheDirectory) return NS_ERROR_FAILURE;