Closed Bug 1373725 Opened 7 years ago Closed 7 years ago

stylo: Rule tree never gets GCed until teardown

Categories

(Core :: CSS Parsing and Computation, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: bholley, Assigned: bholley)

References

(Blocks 1 open bug)

Details

Attachments

(4 files)

Brian Lewis discovered this in [1]. Thanks Brian!

Working up a patch now.

[1] https://github.com/servo/servo/issues/17280
Oh, and on top of that, it looks like we never actually call maybe_gc(). Adding a patch for that as well...
Summary: stylo: Rule tree never increments free counter, and thus never gets GCed until teardown → stylo: Rule tree never gets GCed until teardown
And here's a try run with a bonus fix to assert against permanently leaking rule nodes: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd0ca5e6e654f638f3bceafb56ee6e9d566e7006
MozReview-Commit-ID: 1uipYlIF8fv
Attachment #8878636 - Flags: review?(emilio+bugs)
MozReview-Commit-ID: 9jVkDM4P8mC
Attachment #8878637 - Flags: review?(emilio+bugs)
MozReview-Commit-ID: W2lkQohudA
Attachment #8878638 - Flags: review?(emilio+bugs)
MozReview-Commit-ID: CK5iEWWHFSr
Attachment #8878639 - Flags: review?(emilio+bugs)
Comment on attachment 8878636 [details] [diff] [review]
Part 1 - Actually increment the counter when adding rule nodes to the free list. v1

Review of attachment 8878636 [details] [diff] [review]:
-----------------------------------------------------------------

Pfft... good catch :)
Attachment #8878636 - Flags: review?(emilio+bugs) → review+
Attachment #8878637 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8878638 [details] [diff] [review]
Part 3 - Trigger a rule tree gc at the end of DoProcessPendingRestyles. v1

Review of attachment 8878638 [details] [diff] [review]:
-----------------------------------------------------------------

I'm pretty sure we called this when it was added, I wonder when was it removed...
Attachment #8878638 - Flags: review?(emilio+bugs) → review+
Comment on attachment 8878639 [details] [diff] [review]
Part 4 - Assert against permanently-leaked rule nodes. v1

Review of attachment 8878639 [details] [diff] [review]:
-----------------------------------------------------------------

r=me
Attachment #8878639 - Flags: review?(emilio+bugs) → review+
https://hg.mozilla.org/integration/autoland/rev/1f216a97ac0633e2ffd5f9af2893e4610f7206f7
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Depends on: 1373874
Pushed by bholley@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a21be24aa822
Trigger a rule tree gc at the end of DoProcessPendingRestyles. r=emilio
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: