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

Rewrite uses of .get().map(|foo| foo.root()) and .get().map(Root::from_rooted) to .get_rooted() #7929

Closed
jdm opened this issue Oct 8, 2015 · 0 comments
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor. I-cleanup No impact; the issue is one of maintainability or tidiness.

Comments

@jdm
Copy link
Member

jdm commented Oct 8, 2015

There are a bunch of these that can be found with some searching like http://mxr.mozilla.org/servo/search?string=.get%28%29.map&find=&findi=&filter=root&hitlimit=&tree=servo . We are specifically interested in rewriting the ones that are calling .get() on MutNullableHeap values when they should really be calling .get_rooted() instead.

@jdm jdm added A-content/dom Interacting with the DOM from web content E-less-complex Straightforward. Recommended for a new contributor. I-cleanup No impact; the issue is one of maintainability or tidiness. labels Oct 8, 2015
@frewsxcv frewsxcv added the C-assigned There is someone working on resolving the issue label Oct 8, 2015
bors-servo pushed a commit that referenced this issue Oct 9, 2015
Refactor away duplication of get_rooted functionality

Refactor .get().map(Root::from_rooted)
and .get().map(|foo| foo.root())
to .get_rooted() on MutNullableHeap objects.

First part done mechanically with the following comand:
sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs

Second part done manually after finding them with
git grep ".get().map("

Fixes #7929.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7932)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-less-complex Straightforward. Recommended for a new contributor. I-cleanup No impact; the issue is one of maintainability or tidiness.
Projects
None yet
Development

No branches or pull requests

2 participants