Closed Bug 658845 Opened 13 years ago Closed 13 years ago

"ABORT: Reset() expects non-null URI for referenced elem"

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla6

People

(Reporter: jruderman, Assigned: dholbert)

References

Details

(Keywords: assertion, regression, testcase)

Attachments

(3 files)

###!!! ABORT: Reset() expects non-null URI for referenced elem: 'aURI', file content/base/src/nsReferencedElement.cpp, line 55

This abort was added in http://hg.mozilla.org/mozilla-central/rev/655514007ebd (bug 308590 patch 5).
Attached file stack trace
The assert may very well be bogus.
Attached patch fixSplinter Review
(Confirmed in debug m-c build.)

Yeah, I think the assert is bogus.

Previously (before bug 308590), nsReferencedElement::Reset() began like so:
> 81   Unlink();
> 82 
> 83   nsCOMPtr<nsIURL> url = do_QueryInterface(aURI);
> 84   if (!url)
> 85     return;

I mistakenly assumed that line 84 there was simply a check for "Is aURI a nsIURL?", but turns out it was *also* serving the purpose of checking "Is aURI non-null".

Attached patch removes the bogus ABORT_IF_FALSE and restores a null-check early-return.  Also includes this bug's patch as a crash-test.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #534278 - Flags: review?(roc)
Comment on attachment 534278 [details] [diff] [review]
fix

Review of attachment 534278 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #534278 - Flags: review?(roc) → review+
OS: Mac OS X → All
Hardware: x86 → All
http://hg.mozilla.org/mozilla-central/rev/96fae135f592
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-cedar]
Target Milestone: --- → mozilla6
Comment on attachment 534278 [details] [diff] [review]
fix

Requesting approval to land on aurora, as a followup to bug 308590.  

This is a trivial patch to fix a null-pointer crash. Includes crashtest.
Attachment #534278 - Flags: approval-mozilla-aurora?
(In reply to comment #7)
> This is a trivial patch to fix a null-pointer crash. Includes crashtest.

(a _new_ null-pointer crash, that is)
Attachment #534278 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Gah, sorry -- I'm failing today at remembering whether things landed before or after the last aurora merge.  (I thought the merge was longer ago than it actually was.)

The checkin in comment 6 beat the merge, so this is already in aurora.
Attachment #534278 - Flags: approval-mozilla-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: