Closed Bug 837031 Opened 11 years ago Closed 11 years ago

"ASSERTION: DropReference not called" after accessing child cssRule

Categories

(Core :: DOM: CSS Object Model, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: jruderman, Assigned: bzbarsky)

References

Details

(Keywords: assertion, testcase)

Attachments

(3 files)

Attached file testcase
1. Load the testcase
2. Close the testcase, then force a cycle collection.  (Or just quit the browser.)

###!!! ASSERTION: DropReference not called.: '!mRule', file layout/style/nsCSSRules.cpp, line 1930
This is a regression from bug 774980.  The problem is that we unlink the objects now, so the DropReference call in ~nsCSSKeyframeRule never happens.

I suppose we could try to make the back-ref strong, but it's simpler to DropReference during unlink.

Olli, any idea how I test this?  I can throw it in a crashtest, but that would assert whenever we happen to cc... can I trigger a cc from a crashtest?
Assignee: nobody → bzbarsky
Blocks: 774980
Whiteboard: [need review]
Comment on attachment 709052 [details] [diff] [review]
When unlinking a keyframe rule, make sure to DropReference on its declaration.

Not sure we need a test for this.

We should have some generic way to call drop/disconnect in unlink. It is rather
common thing.
Attachment #709052 - Flags: review?(bugs) → review+
Actually, maybe even a smart pointer which does disconnect
https://hg.mozilla.org/integration/mozilla-inbound/rev/a236893f5737
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla21
https://hg.mozilla.org/mozilla-central/rev/a236893f5737
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: