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

RESOLVED FIXED in mozilla1.9alpha1

Status

()

Core
Layout
P1
critical
RESOLVED FIXED
11 years ago
10 years ago

People

(Reporter: Martijn Wargers (dead), Assigned: bz)

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

11 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

11 years ago
Created attachment 218953 [details]
testcase

Comment 2

11 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

11 years ago
Created attachment 230362 [details]
assertion stack + crash stack
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)
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

11 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?
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
Last Resolved: 11 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
Keywords: fixed1.8.0.7, fixed1.8.1
Blocks: 343206

Comment 12

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