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
Make TopTypeId an untagged union #13224
Conversation
Heads up! This PR modifies the following files:
|
#[derive(Copy)]
pub union TopTypeId {
/// ID used by abstract interfaces.
pub abstract_: (),
/// ID used by interfaces that are not castable.
pub alone: (),
/// ID used by interfaces that derive from Blob.
pub blob: BlobTypeId,
/// ID used by interfaces that derive from DOMPointReadOnly.
pub dompointreadonly: DOMPointReadOnlyTypeId,
/// ID used by interfaces that derive from DOMRectReadOnly.
pub domrectreadonly: DOMRectReadOnlyTypeId,
/// ID used by interfaces that derive from Event.
pub event: EventTypeId,
/// ID used by interfaces that derive from EventTarget.
pub eventtarget: EventTargetTypeId,
/// ID used by interfaces that derive from HTMLCollection.
pub htmlcollection: HTMLCollectionTypeId,
/// ID used by interfaces that derive from NodeList.
pub nodelist: NodeListTypeId,
/// ID used by interfaces that derive from TestBinding.
pub testbinding: TestBindingTypeId,
/// ID used by interfaces that derive from WebGLObject.
pub webglobject: WebGLObjectTypeId,
}
impl Clone for TopTypeId {
fn clone(&self) -> Self { *self }
}
impl EventTarget {
pub fn type_id(&self) -> &'static EventTargetTypeId {
unsafe {
&get_dom_class(self.reflector().get_jsobject().get())
.unwrap()
.type_id
.eventtarget
}
}
} |
r? @Ms2ger |
@bors-servo try |
Make TopTypeId an untagged union <!-- 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/13224) <!-- Reviewable:end -->
💔 Test failed - mac-rel-wpt |
That's #11618. |
Seems fine, but I'm not sure it's worth it. r? @jdm |
☔ The latest upstream changes (presumably #13459) made this pull request unmergeable. Please resolve the merge conflicts. |
Thought about it some more and convinced myself that it's fine. This can merge after a rebase. |
@jdm r? |
@bors-servo: r+ |
📌 Commit c5ab846 has been approved by |
Make TopTypeId an untagged union <!-- 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/13224) <!-- Reviewable:end -->
💔 Test failed - mac-rel-css |
|
@bors-servo retry #13613 |
⚡ Previous build results for arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only mac-rel-css... |
💔 Test failed - mac-rel-css |
⚡ Previous build results for arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-wpt1, mac-rel-wpt2, windows-dev are reusable. Rebuilding only mac-rel-css... |
💔 Test failed - mac-rel-css |
Make TopTypeId an untagged union <!-- 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/13224) <!-- Reviewable:end -->
☀️ Test successful - arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-dev |
This change is