-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
dom: avoid short lived rooting in Node::is_ancestor_of #40776
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
Conversation
Signed-off-by: webbeef <me@webbeef.org>
|
Nice! I wonder if it is possible to address this by making |
I don't think that is an API that we can generalize safely without still ensuring the node is rooted somewhere. |
|
From what I understand (please correct me if I'm wrong), |
|
Idly, I also wonder if we are simply optimizing non-production builds here as the TLS is accessed via |
I take profiles from a Here we also avoid the whole rooting/unrooting which is not free anyway. I agree that we lose in ergonomics and that's annoying. There are many other places in node.rs that could benefit from a similar treatment (many |
It is if the reference refers to the iterator, which holds the root. But that requires |
|
jdm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to find more usable abstractions for code like this in the future, but I don't have good ideas to propose right now.
…ows linux lint)
{"fail_fast": false, "matrix": [{"name": "Windows", "workflow": "windows", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}, {"name": "Linux", "workflow": "linux", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}, {"name": "Lint", "workflow": "lint", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}]}
…ows linux lint)
{"fail_fast": false, "matrix": [{"name": "Windows", "workflow": "windows", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}, {"name": "Linux", "workflow": "linux", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}, {"name": "Lint", "workflow": "lint", "wpt": false, "profile": "release", "unit_tests": false, "build_libservo": false, "bencher": false, "coverage": false, "build_args": "", "wpt_args": "", "number_of_wpt_chunks": 20}]}
When using the iterator nodes are rooted but they are dropped immediately.
Testing: Green wpt run: https://github.com/webbeef/servo/actions/runs/19560383039/job/56012660243