Looking at [mozilla::net::ShutdownEvent::PostAndWait](https://searchfox.org/mozilla-central/rev/b2716c233e9b4398fc5923cbe150e7f83c7c6c5b/netwerk/cache2/CacheFileIOManager.cpp#544-563) I see: ``` rv = CacheFileIOManager::gInstance->mIOThread->Dispatch( this, CacheIOThread::WRITE); // When writes and closing of handles is done MOZ_ASSERT(NS_SUCCEEDED(rv)); TimeDuration waitTime = TimeDuration::FromSeconds(1); while (!mNotified) { ... ``` Shouldn't we return here if the `mIOThread->Dispatch` did not succeed without even entering the while loop ?
Bug 1633342 Comment 34 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Looking at [mozilla::net::ShutdownEvent::PostAndWait](https://searchfox.org/mozilla-central/rev/b2716c233e9b4398fc5923cbe150e7f83c7c6c5b/netwerk/cache2/CacheFileIOManager.cpp#544-563) I see: ``` rv = CacheFileIOManager::gInstance->mIOThread->Dispatch( this, CacheIOThread::WRITE); // When writes and closing of handles is done MOZ_ASSERT(NS_SUCCEEDED(rv)); TimeDuration waitTime = TimeDuration::FromSeconds(1); while (!mNotified) { ... ``` Shouldn't we return here if the `mIOThread->Dispatch` did not succeed without even entering the while loop (instead of just doing `MOZ_ASSERT`)?