Closed Bug 676048 Opened 13 years ago Closed 13 years ago

Report RuleCascadeData and friends in about:memory

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: khuey, Assigned: khuey)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) — Splinter Review
Add up lots of hashtables and arrays
Attachment #550155 - Flags: review?(bzbarsky)
Comment on attachment 550155 [details] [diff] [review]
Patch

> +  // We don't bother enumerating this one since all it does is hold a ref to
> an atom

Add a comment in the entry class to fix that if the entry class ever changes?

Please file a followup bug on me to nuke AttributeSelectorEntry and just use AtomSelectorEntry for the attributes table?  I have no idea why that wasn't done in bug 645491 or some followup...  I think it was because I had some other changes to revamp all this selector hashtable stuff but those never landed.

Please use static_cast, not C-style casts.

>+  for (RuleCascadeData * const *cascadep = &mRuleCascades, *cascade;
>+       (cascade = *cascadep); cascadep = &cascade->mNext) {

How about:

  for (RuleCascadeData* cascade = mRuleCascades; cascade; 
       cascade = cascade->mNext) {

It's not like you have to _modify_ the list, unlike RefreshRuleCascades.

r=me with those changes.
Attachment #550155 - Flags: review?(bzbarsky) → review+
Review comments addressed.  Turns out we should traverse those other hashtables, since RuleHashTagTableEntry inherits from RuleHashTableEntry, we were traversing.
Attachment #550155 - Attachment is obsolete: true
Attachment #550180 - Flags: review+
http://hg.mozilla.org/mozilla-central/rev/f185f48d35dc
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment on attachment 550180 [details] [diff] [review]
Patch w/review comments

This could still use a comment on RuleHashTagTableEntry that says that if any members are added the traverse code will need changing...
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: