Closed Bug 774980 Opened 12 years ago Closed 12 years ago

Hook up nsCSSKeyframeRule to cycle collection

Categories

(Core :: CSS Parsing and Computation, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

It holds a ref to the nsCSSKeyframeStyleDeclaration.
So one issue here is that the superclass is not CCed, so I would be adding my own refcount instead of reusing the one from there... Can I make the superclass use the CC refcount without implementing CC? Seems like we'll want CC on Rule at some point anyway, right?
Depends on: 753517
The main issue that I can see is that the CC refcount will add and remove the object from the purple buffer. When the CC examines things in the purple buffer, it tries to QI to nsCycleCollectionISupports, which will end up in null, I assume, which the CC won't deal with, and you'll get null derefs and assertion failures. I guess you could make it into a dummy CC class that has an empty traverse/unlink.
I don't know if we want to add CC to Rule, are all its subclasses exposed through the DOM? Do we ever create instances of Rule directly? If not we could push refcounting to the subclasses. I wonder if the CC AddRef/Release being slower will matter here :-/.
> are all its subclasses exposed through the DOM? No. The most common one (StyleRule) is not. So maybe moving refcounting out of Rule is the right way to go....
For what it's worth, I'm moving refcounting out of Rule in bug 795221. At that point, this should be pretty straightforward, I think.
Depends on: 795221
Attached patch This seems to do the trick (deleted) — Splinter Review
Attachment #703751 - Flags: review?(bugs)
Whiteboard: [need review]
Attachment #703751 - Flags: review?(bugs) → review+
Flags: in-testsuite-
Whiteboard: [need review]
Target Milestone: --- → mozilla21
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Depends on: 837031
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: