Closed Bug 810103 Opened 12 years ago Closed 12 years ago

Make nsCSSStyleSheet::mRuleCollection into an nsRefPtr

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

In the traverse function for nsCSSStyleSheet I see this:
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_RAWPTR(mRuleCollection)
mRuleCollection has type |CSSRuleListImpl*|, and CSSRuleListImpl doesn't seem to be a cycle collected class, so I'm not sure why we need to have that traverse.
At some point this will need to be cycle-collected (not least when it gets switched to WebIDL bindings, right?).
Sure. Maybe I could convert mRuleCollection to a refPtr to get rid of the weird TRAVESER_RAWPTR instead if you are worried about forgetting to add the field again later?
Sounds good to me!
Assignee: nobody → continuation
Summary: nsCSSStyleSheet doesn't seem to need to traverse mRuleCollection → Make nsCSSStyleSheet::mRuleCollection into an nsRefPtr
Attachment #680714 - Flags: review?(bzbarsky)
Comment on attachment 680714 [details] [diff] [review]
refptrize, also remove pointless nullcheck

r=me
Attachment #680714 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/77b383566a57
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: