Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRename JS<T> to Dom<T>, Root<T> to DomRoot<T>, and other things #18635
+2,886
−2,895
Conversation
highfive
commented
Sep 26, 2017
|
Heads up! This PR modifies the following files:
|
highfive
commented
Sep 26, 2017
| @@ -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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Like DOMRefCell<T>.
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.
|
@bors-servo r=emilio p=3 |
|
|
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 -->
|
|
This was referenced Sep 26, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
nox commentedSep 26, 2017
•
edited by SimonSapin
This change is