Make nsCSSStyleSheet::mRuleCollection into an nsRefPtr

RESOLVED FIXED in mozilla19

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: mccr8, Assigned: mccr8)

Tracking

unspecified
mozilla19
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

7 years ago
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?).
Assignee

Comment 2

7 years ago
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

Updated

7 years ago
Assignee: nobody → continuation
Summary: nsCSSStyleSheet doesn't seem to need to traverse mRuleCollection → Make nsCSSStyleSheet::mRuleCollection into an nsRefPtr
Assignee

Updated

7 years ago
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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.