Closed
Bug 81336
Opened 24 years ago
Closed 24 years ago
nsHttpAuthCache causing assertions when switching profiles
Categories
(Core :: Networking: HTTP, defect)
Core
Networking: HTTP
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: ccarlen, Assigned: darin.moz)
Details
Attachments
(1 file)
|
1.10 KB,
patch
|
Details | Diff | Splinter Review |
After switching profiles, the assertion comes from the first line of
nsHttpAuthCache::GetCredentialsForPath(). When I put in the code to make the
HTTP handler observe profile changes, this used to work. Since then, the code in
nsHttpHandler::Observe() has changed considerably. nsHttpHandler::Observe now
calls mAuthCache->ClearAll() which destroys nsHttpAuthCache's hash table. It is
never re-initialized and so we get the assertion. Two ways to fix this:
(1) From nsHttpHandler::Observe(), instead of calling a method which destroys
the whole hash table, call something which just removes all entries from the
hash table.
(2) If the auth cache is destroyed on a "profile-before-change" notification, it
should be re-initialized so that it's usable again - probably on a
"profile-after-change" notification.
Darin, you would know best how to solve this - those are just my suggestions.
| Reporter | ||
Comment 1•24 years ago
|
||
The assertion is bad enough but this actually causes http auth to fail after a
profile switch. Upping severity.
Severity: major → critical
| Assignee | ||
Comment 2•24 years ago
|
||
i thought this situation was handled... guess not. should be an easy fix.
| Assignee | ||
Comment 3•24 years ago
|
||
| Assignee | ||
Comment 4•24 years ago
|
||
the fix for this bug is so trivial... i mistakenly left NS_ENSURE_TRUE's at
the top of GetCredentialsFor{Path,Domain} and SetCredentials which assert
that the auth DB exist. yet, the code inside these functions handles the case
of a null DB. so, the fix is just to remove the assertions.
ccarlen: can i get an r= from you on this?
| Reporter | ||
Comment 5•24 years ago
|
||
That works. Thanks for dealing so quickly. r=ccarlen.
BTW, those NS_ENSURE_TRUEs do a lot more than assert - they assert and then bail.
Comment 7•24 years ago
|
||
rs=mscott
| Assignee | ||
Comment 8•24 years ago
|
||
fix checked in
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 9•23 years ago
|
||
Verified per darin's comment.
Status: RESOLVED → VERIFIED
QA Contact: tever → junruh
You need to log in
before you can comment on or make changes to this bug.
Description
•