Closed Bug 334602 Opened 14 years ago Closed 13 years ago

[FIX]ASSERTION: Reparenting something that has no usable parent? Shouldn't happen!: 'Not Reached'

Categories

(Core :: Layout, defect, P1, critical)

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: martijn.martijn, Assigned: bzbarsky)

References

Details

(5 keywords)

Attachments

(3 files)

See upcoming testcase, which gives this assertion in current trunk build.
Basically, it is these styles rules that cause the assertion:
html::first-line { }
html::before { content:"This should not give an assertion in Mozilla";}

This assertion was added with the fix for bug 322348.
Attached file testcase
This leads to a crash for me (SeaMonkey debug Linux):
1. load testcase
2. CTRL++ (zoom in)

The reason for the assertion is that GetParentStyleContextFrame()
returns early if there is no parent content:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/generic/nsFrame.cpp&rev=3.660&root=/cvsroot&mark=4818-4821#4811

and we come here from nsCSSFrameConstructor::WrapFramesInFirstLineFrame
on the root content. See attached stack.
Severity: normal → critical
Keywords: assertion, crash
OS: Windows XP → All
Attached patch FixSplinter Review
Pseudo-elements are not the root....
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #230366 - Flags: superreview?(dbaron)
Attachment #230366 - Flags: review?(dbaron)
We need this on the branches (and I'll probably try to land it on 1.7 as well....)
Flags: blocking1.8.1?
Flags: blocking1.8.0.6?
Priority: -- → P1
Summary: ASSERTION: Reparenting something that has no usable parent? Shouldn't happen!: 'Not Reached' → [FIX]ASSERTION: Reparenting something that has no usable parent? Shouldn't happen!: 'Not Reached'
Target Milestone: --- → mozilla1.9alpha
Flags: blocking1.8.1? → blocking1.8.1+
Flags: blocking1.8.0.7?
Flags: blocking1.8.0.7+
Flags: blocking1.7.14?
Flags: blocking-aviary1.0.9?
Comment on attachment 230366 [details] [diff] [review]
Fix

r+sr=dbaron
Attachment #230366 - Flags: superreview?(dbaron)
Attachment #230366 - Flags: superreview+
Attachment #230366 - Flags: review?(dbaron)
Attachment #230366 - Flags: review+
Comment on attachment 230366 [details] [diff] [review]
Fix

This is a very safe crash fix.
Attachment #230366 - Flags: approval1.8.1?
Attachment #230366 - Flags: approval1.8.0.7?
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment on attachment 230366 [details] [diff] [review]
Fix

a=drivers for MOZILLA_1_8_BRANCH
Attachment #230366 - Flags: approval1.8.1? → approval1.8.1+
Comment on attachment 230366 [details] [diff] [review]
Fix

approved for 1.8.0 branch, a=dveditz for drivers
Attachment #230366 - Flags: approval1.8.0.7? → approval1.8.0.7+
Fixed for 1.8.0.7 and 1.8.1
Blocks: 343206
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.