зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382845 - We should cancel mNetworkTriggerTimer when we start reading data from the cache. r=michal
MozReview-Commit-ID: HOnWemy2YCY
This commit is contained in:
Родитель
d53eee5b25
Коммит
5c26b3aa77
|
@ -5015,6 +5015,13 @@ nsHttpChannel::ReadFromCache(bool alreadyMarkedValid)
|
||||||
LOG(("nsHttpChannel::ReadFromCache [this=%p] "
|
LOG(("nsHttpChannel::ReadFromCache [this=%p] "
|
||||||
"Using cached copy of: %s\n", this, mSpec.get()));
|
"Using cached copy of: %s\n", this, mSpec.get()));
|
||||||
|
|
||||||
|
// When racing the cache with the network with a timer, and we get data from
|
||||||
|
// the cache, we should prevent the timer from triggering a network request.
|
||||||
|
if (mNetworkTriggerTimer) {
|
||||||
|
mNetworkTriggerTimer->Cancel();
|
||||||
|
mNetworkTriggerTimer = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
if (mRaceCacheWithNetwork) {
|
if (mRaceCacheWithNetwork) {
|
||||||
MOZ_ASSERT(mFirstResponseSource != RESPONSE_FROM_CACHE);
|
MOZ_ASSERT(mFirstResponseSource != RESPONSE_FROM_CACHE);
|
||||||
if (mFirstResponseSource == RESPONSE_PENDING) {
|
if (mFirstResponseSource == RESPONSE_PENDING) {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче