From 40a21eea5b39437a63bb80b303a3c32c09837e64 Mon Sep 17 00:00:00 2001 From: Michal Novotny Date: Wed, 8 Jan 2020 14:09:33 +0000 Subject: [PATCH] Bug 1519126 - Intermittent GECKO(1168) | Assertion failure: !chunk->IsReady() r=mayhemer Differential Revision: https://phabricator.services.mozilla.com/D58533 --HG-- extra : moz-landing-system : lando --- netwerk/cache2/CacheFile.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/netwerk/cache2/CacheFile.cpp b/netwerk/cache2/CacheFile.cpp index f314bd9d5e51..987f8ba324c8 100644 --- a/netwerk/cache2/CacheFile.cpp +++ b/netwerk/cache2/CacheFile.cpp @@ -2300,7 +2300,11 @@ void CacheFile::NotifyListenersAboutOutputRemoval() { RefPtr chunk; mChunks.Get(idx, getter_AddRefs(chunk)); if (chunk) { - MOZ_ASSERT(!chunk->IsReady()); + // Skip these listeners because the chunk is being read. We don't have + // assertion here to check its state because it might be already in READY + // state while CacheFile::OnChunkRead() is waiting on Cache I/O thread for + // a lock so the listeners hasn't been notified yet. In any case, the + // listeners will be notified from CacheFile::OnChunkRead(). continue; }