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

Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things #18635

Merged
merged 9 commits into from Sep 26, 2017

Conversation

@nox
Copy link
Member

nox commented Sep 26, 2017

This change is Reviewable

@highfive
Copy link

highfive commented Sep 26, 2017

Heads up! This PR modifies the following files:

  • @wafflespeanut: python/tidy/servo_tidy/tidy.py, python/tidy/servo_tidy_tests/ban.rs, python/tidy/servo_tidy_tests/test_tidy.py, python/tidy/servo_tidy_tests/ban-domrefcell.rs
  • @KiChjang: components/script/dom/request.rs, components/script/test.rs, components/script/dom/workerlocation.rs, components/script/dom/xmldocument.rs, components/script/dom/textencoder.rs and 298 more
  • @edunham: python/tidy/servo_tidy/tidy.py, python/tidy/servo_tidy_tests/ban.rs, python/tidy/servo_tidy_tests/test_tidy.py, python/tidy/servo_tidy_tests/ban-domrefcell.rs
  • @fitzgen: components/script/dom/request.rs, components/script/test.rs, components/script/dom/workerlocation.rs, components/script/dom/xmldocument.rs, components/script/dom/textencoder.rs and 298 more
  • @emilio: components/script/dom/webglframebuffer.rs, components/layout/wrapper.rs, components/script/dom/webglbuffer.rs, components/script/dom/webgl_extensions/wrapper.rs, components/script/dom/webgltexture.rs and 18 more
@highfive
Copy link

highfive commented Sep 26, 2017

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!
@emilio
emilio approved these changes Sep 26, 2017
Copy link
Member

emilio left a comment

rs=me, given you and @jdm discussed this yesterday, and this looks fine to me.

Kinda unfortunate that we have both Dom and DOM stuff though...

@@ -164,8 +164,8 @@ relationship. The `Document` just has a pointer to a `Window`, one of many
pointers to that object, which can live in native DOM data structures or in
JavaScript objects. These are precisely the pointers we need to tell the
garbage collector about. We do this with a
[custom type for traced pointers: `JS<T>`][js] (for example, the `JS<Window>`
above). The implementation of `trace` for `JS<T>` is not auto-generated; this
[custom type for traced pointers: `Dom<T>`][js] (for example, the `Dom<Window>`

This comment has been minimized.

@emilio

emilio Sep 26, 2017

Member

nit: Maybe change the link name too? (right now it's called js).

This comment has been minimized.

@nox

nox Sep 26, 2017

Author Member

Done.

nox added 7 commits Sep 25, 2017
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
@nox nox force-pushed the RENAME-ALL-THE-THINGS branch from bef6e1b to f87c2a8 Sep 26, 2017
@nox
Copy link
Member Author

nox commented Sep 26, 2017

@bors-servo r=emilio p=3

@bors-servo
Copy link
Contributor

bors-servo commented Sep 26, 2017

📌 Commit f87c2a8 has been approved by emilio

@bors-servo
Copy link
Contributor

bors-servo commented Sep 26, 2017

Testing commit f87c2a8 with merge 1282e0d...

bors-servo added a commit that referenced this pull request Sep 26, 2017
Rename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things

<!-- 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/18635)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

bors-servo commented Sep 26, 2017

@bors-servo bors-servo mentioned this pull request Sep 26, 2017
4 of 5 tasks complete
@bors-servo bors-servo merged commit f87c2a8 into master Sep 26, 2017
4 checks passed
4 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
dependency-ci Dependencies checked
Details
homu Test successful
Details
@bors-servo bors-servo mentioned this pull request Sep 26, 2017
4 of 4 tasks complete
@nox nox deleted the RENAME-ALL-THE-THINGS branch Sep 26, 2017
@bors-servo bors-servo mentioned this pull request Sep 26, 2017
3 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.