-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo #8639
Conversation
bholley
commented
Nov 21, 2015
@bors-servo try |
Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo
This is a continuation of the work in #8595. |
💔 Test failed - linux-dev |
…eLayoutFoo to ThreadSafeLayoutFoo.
e7d1603
to
afa3834
Compare
@bors-servo try |
Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8639) <!-- Reviewable:end -->
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt |
} | ||
|
||
// These can violate the thread-safety and therefore are not public. | ||
trait DangerousThreadSafeLayoutNode<'ln> : ThreadSafeLayoutNode<'ln> { |
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.
So as I typed this I realized why you didn't use UnsafeThreadSafeLayoutNode
, as it's a bit of an oxymoron of a name :) But I still lean toward consistency in use of "Unsafe". How about MemoryUnsafeThreadSafeLayoutNode
, to maintain consistency in naming without the paradox?
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 could, but we already have something called UnsafeLayoutNode, which would be super confusing IMO - that's why I opted for a different name. :-)
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.
And in general, this name doesn't escape anywhere and is used in only a few places in this file, so I think having it be consistent is less important.
Since you're looking at it... @pcwalton r? |
Sure, seems fine. |
@bors-servo: r+ |
📌 Commit afa3834 has been approved by |
Use associated types for layout wrapper trait, and generalized ThreadSafeLayoutFoo <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8639) <!-- Reviewable:end -->
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt |