Closed Bug 975787 Opened 10 years ago Closed 10 years ago

With cache disabled, assertion fails in nsWyciwygChannel::WriteToCacheEntry

Categories

(Core :: Networking: Cache, defect)

x86_64
macOS
defect
Not set
critical

Tracking

()

VERIFIED FIXED
mozilla31
Tracking Status
firefox31 --- verified

People

(Reporter: jruderman, Assigned: mayhemer)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

Attached file testcase
With:
  user_pref("browser.cache.disk.enable", false);
  user_pref("browser.cache.memory.enable", false);

Assertion failure: ((bool)(__builtin_expect(!!(!NS_FAILED_impl(rv)), 1))), at netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp:471

This assertion was added in bug 939567:
MOZ_ASSERT(NS_SUCCEEDED(rv));
Attached file stack
The assert was put there just to check the most recent changes we've made here.  Except this case, there is no failure.  

I think we should turn it to a hard failure:

467   if (mozilla::net::CacheObserver::UseNewCache()) {
468     nsresult rv = EnsureWriteCacheEntry();
469     if (NS_FAILED(rv)) return rv;


Michal?
Flags: needinfo?(michal.novotny)
Yes, it should be a failure.
Flags: needinfo?(michal.novotny)
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attached patch v1Splinter Review
Attachment #8386143 - Flags: review?(michal.novotny)
Comment on attachment 8386143 [details] [diff] [review]
v1

Review of attachment 8386143 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with the following fixed

::: netwerk/protocol/wyciwyg/nsWyciwygChannel.cpp
@@ +464,5 @@
>  
>    mMode = WRITING;
>  
>    if (mozilla::net::CacheObserver::UseNewCache()) {
>      mozilla::DebugOnly<nsresult> rv = EnsureWriteCacheEntry();

You need to remove mozilla::DebugOnly.
Attachment #8386143 - Flags: review?(michal.novotny) → review+
https://hg.mozilla.org/mozilla-central/rev/08d252ee432a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Reproduced in Nightly 2014-02-23-mozilla-central-debug, Win 7 x64.
Verified fixed Nightly 31.0a1 2014-03-20-mozilla-central-debug.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: