Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure RuleNodes are dropped when Gecko drops the Stylist #14273

Merged
merged 3 commits into from
Nov 21, 2016

Conversation

heycam
Copy link
Contributor

@heycam heycam commented Nov 18, 2016

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.


This change is Reviewable

@highfive
Copy link

Heads up! This PR modifies the following files:

  • @bholley: components/style/selector_matching.rs
  • @emilio: components/style/selector_matching.rs, ports/geckolib/glue.rs

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
  • These commits modify style code, but no tests are modified. Please consider adding a test!

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Nov 18, 2016
@heycam
Copy link
Contributor Author

heycam commented Nov 18, 2016

@bors-servo r=bholley,emilio

@bors-servo
Copy link
Contributor

📌 Commit cd164d6 has been approved by bholley,emilio

@highfive highfive assigned bholley and unassigned mbrubeck Nov 18, 2016
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 18, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit cd164d6 with merge 09a5a7d...

bors-servo pushed a commit that referenced this pull request Nov 20, 2016
ensure RuleNodes are dropped when Gecko drops the Stylist

<!-- Please describe your changes on the following line: -->

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14273)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 20, 2016
@bors-servo
Copy link
Contributor

⚡ Previous build results for arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only linux-rel-css, linux-rel-wpt...

@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Nov 20, 2016
@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #14294) made this pull request unmergeable. Please resolve the merge conflicts.

@highfive highfive added the S-needs-rebase There are merge conflict errors. label Nov 20, 2016
We only consider doing a GC currently if the root node has a zero refcount.
But that only happens if it has no children -- even weak children keep a
strong reference to their parent.  So at the very least, we should do a
GC specifically when the RuleTree is going away.  (We probably want to add
some other GC opportunities too at some point, otherwise it's easy to
never GC a RuleTree.)
This is needed to keep the assertion in the RuleTree GC functions that checks
we're being called on the non-worker layout thread.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 21, 2016
@heycam
Copy link
Contributor Author

heycam commented Nov 21, 2016

@bors-servo r=bholley,emilio

@bors-servo
Copy link
Contributor

📌 Commit 226c946 has been approved by bholley,emilio

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 21, 2016
@bors-servo
Copy link
Contributor

⚡ Previous build results for arm32, arm64, linux-dev, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only linux-rel-css, linux-rel-wpt...

@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Nov 21, 2016
@heycam
Copy link
Contributor Author

heycam commented Nov 21, 2016

@emilio This is hitting the new assertion that came from #14278. In that assertion, why do we assert that the refcount of the root node is 0? Is it because we are assuming that we have previously just done a GC that removed all nodes except for the root? With the patches in this PR, since we don't GC so often, we might be getting that final GC from the script thread (from the JS GC, it looks like) with some rule nodes still in the tree (and therefore with the root having refcount > 0). Is there a problem with that? Should we instead be asserting that there are no rule nodes in the rule tree that have refcounts that exceed their number of children (i.e. there are no strong references to them from elsewhere)?

@heycam
Copy link
Contributor Author

heycam commented Nov 21, 2016

@bors-servo r-

…trong references.

It could still have children.
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 21, 2016
@heycam
Copy link
Contributor Author

heycam commented Nov 21, 2016

@emilio said on IRC it should be fine to remove the refcount=0 part of the assertion.

@heycam
Copy link
Contributor Author

heycam commented Nov 21, 2016

@bors-servo r=bholley,emilio

@bors-servo
Copy link
Contributor

📌 Commit d92cc8e has been approved by bholley,emilio

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 21, 2016
@bors-servo
Copy link
Contributor

⌛ Testing commit d92cc8e with merge e5fbdb1...

bors-servo pushed a commit that referenced this pull request Nov 21, 2016
ensure RuleNodes are dropped when Gecko drops the Stylist

<!-- Please describe your changes on the following line: -->

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14273)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-wpt1

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 21, 2016
@emilio
Copy link
Member

emilio commented Nov 21, 2016

@bors-servo retry #14267

@bors-servo
Copy link
Contributor

⌛ Testing commit d92cc8e with merge 385e59e...

bors-servo pushed a commit that referenced this pull request Nov 21, 2016
ensure RuleNodes are dropped when Gecko drops the Stylist

<!-- Please describe your changes on the following line: -->

These are the Servo-side patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1318238, which already have been reviewed by @bholley and @emilio there.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/14273)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 21, 2016
@bors-servo
Copy link
Contributor

@bors-servo bors-servo merged commit d92cc8e into servo:master Nov 21, 2016
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants