mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 596808 - nsDiskCacheDevice::Init() called twice resulting in no disk cache available r=jduell, a=betaN
This commit is contained in:
parent
fbf1398801
commit
6e12c675dc
4
netwerk/cache/nsCacheService.cpp
vendored
4
netwerk/cache/nsCacheService.cpp
vendored
@ -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<nsIPrefBranch> branch = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
|
2
netwerk/cache/nsDiskCache.h
vendored
2
netwerk/cache/nsDiskCache.h
vendored
@ -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 };
|
||||
|
5
netwerk/cache/nsDiskCacheDevice.cpp
vendored
5
netwerk/cache/nsDiskCacheDevice.cpp
vendored
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user