Auto merge of #21105 - Manishearth:dom-inheritance-assert, r=nox

Assert that DOM structs have the correct first field

Not having the right field can lead to fun bugs like https://github.com/ferjm/servo/pull/1 where the struct gets mis-reinterpreted as what should be its parent (but is not layout-wise)

<!-- 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/21105)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-07-03 12:52:12 -04:00 committed by GitHub
commit 3c43fa6b1d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 109 additions and 9 deletions

4
Cargo.lock generated
View file

@ -722,6 +722,10 @@ dependencies = [
[[package]]
name = "dom_struct"
version = "0.0.1"
dependencies = [
"quote 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "domobject_derive"