Bug 975787 - With cache disabled, assertion fails in nsWyciwygChannel::WriteToCacheEntry, r=michal
authorHonza Bambas <honzab.moz@firemni.cz>
Mon, 17 Mar 2014 18:21:37 +0100
changeset 192447 08d252ee432ad51a00fd6a419db107dd711dc4d6
parent 192446 b239389ec1e6dc842168fe906743c03b28ef6547
child 192448 042679e999a7baeb24c03ed4d9760ef7fccf4c74
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmichal
bugs975787
milestone30.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 975787 - With cache disabled, assertion fails in nsWyciwygChannel::WriteToCacheEntry, r=michal
netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
--- a/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
+++ b/netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ -461,20 +461,18 @@ nsWyciwygChannel::WriteToCacheEntry(cons
     LOG(("nsWyciwygChannel::WriteToCacheEntry already open for reading"));
     MOZ_ASSERT(false);
     return NS_ERROR_UNEXPECTED;
   }
 
   mMode = WRITING;
 
   if (mozilla::net::CacheObserver::UseNewCache()) {
-    mozilla::DebugOnly<nsresult> rv = EnsureWriteCacheEntry();
-    // If this fails in release, that is not much of a deal. We try
-    // it once again on the IO thread.
-    MOZ_ASSERT(NS_SUCCEEDED(rv));
+    nsresult rv = EnsureWriteCacheEntry();
+    if (NS_FAILED(rv)) return rv;
   }
 
   return mCacheIOTarget->Dispatch(new nsWyciwygWriteEvent(this, aData),
                                   NS_DISPATCH_NORMAL);
 }
 
 nsresult
 nsWyciwygChannel::WriteToCacheEntryInternal(const nsAString &aData)