зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1396307 - Set mCacheAsyncOpenCalled back to flase when AsyncOpenURI fails r=michal
MozReview-Commit-ID: VnwI3ERHVt --HG-- extra : rebase_source : b0dd35d8dc246edef20c4d6cf220013131366b1e
This commit is contained in:
Родитель
ec3cf55bec
Коммит
617da36cf0
|
@ -3979,6 +3979,10 @@ nsHttpChannel::OpenCacheEntry(bool isHttps)
|
|||
mRaceCacheWithNetwork = sRCWNEnabled;
|
||||
}
|
||||
rv = cacheStorage->AsyncOpenURI(openURI, extension, cacheEntryOpenFlags, this);
|
||||
if (NS_FAILED(rv)) {
|
||||
// Drop the flag since the cache open failed
|
||||
mCacheAsyncOpenCalled = false;
|
||||
}
|
||||
} else {
|
||||
// We pass `this` explicitly as a parameter due to the raw pointer
|
||||
// to refcounted object in lambda analysis.
|
||||
|
@ -3988,7 +3992,10 @@ nsHttpChannel::OpenCacheEntry(bool isHttps)
|
|||
if (self->mNetworkTriggered) {
|
||||
self->mRaceCacheWithNetwork = true;
|
||||
}
|
||||
cacheStorage->AsyncOpenURI(openURI, extension, cacheEntryOpenFlags, self);
|
||||
nsresult rv = cacheStorage->AsyncOpenURI(openURI, extension, cacheEntryOpenFlags, self);
|
||||
if (NS_FAILED(rv)) {
|
||||
self->mCacheAsyncOpenCalled = false;
|
||||
}
|
||||
};
|
||||
|
||||
mCacheOpenTimer = do_CreateInstance(NS_TIMER_CONTRACTID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче