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

RESOLVED FIXED in mozilla1.9alpha1

Status

()

P1
critical
RESOLVED FIXED
13 years ago
11 years ago

People

(Reporter: martijn.martijn, Assigned: bzbarsky)

Tracking

(5 keywords)

Trunk
mozilla1.9alpha1
x86
All
assertion, crash, fixed1.8.0.7, fixed1.8.1, testcase
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.7.14 ?
blocking-aviary1.0.9 ?
blocking1.8.1 +
blocking1.8.0.7 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

(Reporter)

Description

13 years ago
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.
(Reporter)

Comment 1

13 years ago
Created attachment 218953 [details]
testcase

Comment 2

13 years ago
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

Comment 3

13 years ago
Created attachment 230362 [details]
assertion stack + crash stack
(Assignee)

Comment 4

13 years ago
Created attachment 230366 [details] [diff] [review]
Fix

Pseudo-elements are not the root....
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #230366 - Flags: superreview?(dbaron)
Attachment #230366 - Flags: review?(dbaron)
(Assignee)

Comment 5

13 years ago
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

Updated

13 years ago
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?
(Assignee)

Comment 7

12 years ago
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?
(Assignee)

Comment 8

12 years ago
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 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+
(Assignee)

Comment 11

12 years ago
Fixed for 1.8.0.7 and 1.8.1
Keywords: fixed1.8.0.7, fixed1.8.1
(Assignee)

Updated

12 years ago
Blocks: 343206

Comment 12

11 years ago
Crashtest checked in.
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.