If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

[FIX]"ASSERTION: no user stylesheets in styleset, but we have one!" when removing frames from frameset

RESOLVED FIXED

Status

()

Core
Layout
P3
normal
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: Jesse Ruderman, Assigned: bz)

Tracking

(Blocks: 1 bug, {assertion, regression, testcase})

Trunk
x86
All
assertion, regression, testcase
Points:
---
Dependency tree / graph
Bug Flags:
blocking1.9 +
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

10 years ago
Loading the testcase triggers:

###!!! ASSERTION: no user stylesheets in styleset, but we have one!: 'numBefore > 0', file /Users/jruderman/trunk/mozilla/layout/base/nsPresShell.cpp, line 1824

This is a regression from within the last few days.
(Reporter)

Comment 1

10 years ago
Created attachment 271015 [details]
testcase
(Reporter)

Comment 2

10 years ago
This assertion is triggered when loading http://online.wsj.com/public/us.

Comment 3

10 years ago
reproducible in winxp/linux as well and #6 in a recent top site run with over 1300 occurrences.
OS: Mac OS X → All
It's one of the more visible assertions in Mochitest runs in debug builds, too; I don't have access to a machine to determine which test(s) cause it.
This is a regression from bug 310165.

The problem is that setting up the pref stylesheet fails if there is non-chrome script on the JS stack, because presshell uses the CSSOM API to set it up, and we added security checks to those calls (in particular to InsertRule).

We can either push null JSContexts on the stack in a bunch of places in presshell and in nsMathMLFrame, or we need to add a non-scriptable version of InsertRule that skips the security check.

David, do you have a preference?

Oh, and this bug can easily lead to pages without the pref stylesheet applied, so I think we need to block on it.
Blocks: 310165
Component: Layout: HTML Frames → Layout
Flags: blocking1.9?
QA Contact: layout.html-frames → layout
I don't have a preference, other than whichever seems simpler and more maintainable.
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Blocks: 403310
Created attachment 288925 [details] [diff] [review]
Fix
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Created attachment 288927 [details] [diff] [review]
Same as diff -w
Attachment #288927 - Flags: superreview?(dbaron)
Attachment #288927 - Flags: review?(dbaron)
Summary: "ASSERTION: no user stylesheets in styleset, but we have one!" when removing frames from frameset → [FIX]"ASSERTION: no user stylesheets in styleset, but we have one!" when removing frames from frameset
Blocks: 404077
Comment on attachment 288927 [details] [diff] [review]
Same as diff -w

r+sr=dbaron.

Should the InsertRule security check be changed to fail if there's nothing on the context stack?
Attachment #288927 - Flags: superreview?(dbaron)
Attachment #288927 - Flags: superreview+
Attachment #288927 - Flags: review?(dbaron)
Attachment #288927 - Flags: review+
You mean so that these things won't randomly work sometimes and randomly fail at other times?  That seems like a good idea.  I'll make that change before checking in.
Created attachment 297498 [details] [diff] [review]
Updated to comments
Checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
(Reporter)

Comment 13

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.