Closed
Bug 950164
Opened 11 years ago
Closed 11 years ago
crash in nsCOMPtr_base::assign_assuming_AddRef(nsISupports*) | mozilla::net::CacheFileIOManager::OnProfile()
Categories
(Core :: Networking: Cache, defect)
Tracking
()
VERIFIED
FIXED
mozilla30
People
(Reporter: mayhemer, Assigned: mayhemer)
References
Details
(Keywords: crash)
Crash Data
Attachments
(1 file)
1.50 KB,
patch
|
michal
:
review+
mayhemer
:
checkin+
|
Details | Diff | Splinter Review |
This bug was filed from the Socorro interface and is
report bp-62b39577-a61e-44cd-9890-60c702131211.
=============================================================
Crash Address 0x10
Missing gInstance check?
michal@156755
966 if (directory) {
michal@156755
> 967 rv = directory->Clone(getter_AddRefs(gInstance->mCacheDirectory));
michal@156755
968 NS_ENSURE_SUCCESS(rv, rv);
Assignee | ||
Comment 2•11 years ago
|
||
Should be fixed before the temp enable.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8372672 -
Flags: review?(michal.novotny)
Comment 4•11 years ago
|
||
Comment on attachment 8372672 [details] [diff] [review]
v1
Review of attachment 8372672 [details] [diff] [review]:
-----------------------------------------------------------------
CacheFileIOManager::OnProfile() is called only from CacheObserver::Observe() and we call CacheFileIOManager::Init() just before we call OnProfile(). Maybe a better fix would be to call OnProfile() only when Init() succeeds or fails with NS_ERROR_ALREADY_INITIALIZED, i.e. something like:
rv = CacheFileIOManager::Init();
if (NS_SUCCEEDED(rv) || rv == NS_ERROR_ALREADY_INITIALIZED) {
CacheFileIOManager::OnProfile();
}
I would slightly prefer this fix over your patch, but it is up to you. Anyway, the question here is why initialization of CacheFileIOManager failed?
Attachment #8372672 -
Flags: review?(michal.novotny) → review+
Assignee | ||
Comment 5•11 years ago
|
||
I was thinking of this and it's similar to discussion in bug 971975. Doing non-null checks in a method is safer than doing state checks out of a method. So I'll rather leave it, since this is a crash fix.
Assignee | ||
Comment 6•11 years ago
|
||
Comment on attachment 8372672 [details] [diff] [review]
v1
https://hg.mozilla.org/integration/mozilla-inbound/rev/4da945c0084c
Attachment #8372672 -
Flags: checkin+
Assignee | ||
Comment 7•11 years ago
|
||
(In reply to Michal Novotny (:michal) from comment #4)
> Anyway, the question here is why initialization of CacheFileIOManager failed?
"probably could not create the IO thread" as the comment in the patch says.
Comment 8•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Assignee | ||
Comment 9•11 years ago
|
||
Verified after the cache2 trial (bug 967693).
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•