From e2c716a29d0f4818aca92a9248f75bcc7340fbd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Wed, 26 Dec 2018 03:33:49 +0100 Subject: [PATCH] Bug 1516366 - Move mExpandoAndGeneration from nsDocument to nsIDocument. r=smaug Now that bindgen can represent it properly (bug 1516365) we can do this. Differential Revision: https://phabricator.services.mozilla.com/D15357 --- dom/base/nsDocument.h | 7 ------- dom/base/nsIDocument.h | 4 ++++ layout/style/ServoBindings.toml | 5 ----- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/dom/base/nsDocument.h b/dom/base/nsDocument.h index 44d4b5ac17cf..10bb4af1a32f 100644 --- a/dom/base/nsDocument.h +++ b/dom/base/nsDocument.h @@ -173,13 +173,6 @@ class nsDocument : public nsIDocument { virtual ~nsDocument(); public: - // FIXME(emilio): This needs to be here instead of in nsIDocument because Rust - // can't represent alignas(8) values on 32-bit architectures, which would - // cause nsIDocument's layout to be wrong in the Rust side. - // - // This can be fixed after updating to rust 1.25 and updating bindgen to - // include https://github.com/rust-lang-nursery/rust-bindgen/pull/1271. - js::ExpandoAndGeneration mExpandoAndGeneration; friend class nsCallRequestFullscreen; diff --git a/dom/base/nsIDocument.h b/dom/base/nsIDocument.h index d7d9e8cdb11f..fb00ae482894 100644 --- a/dom/base/nsIDocument.h +++ b/dom/base/nsIDocument.h @@ -4418,6 +4418,10 @@ class nsIDocument : public nsINode, // Pres shell resolution saved before entering fullscreen mode. float mSavedResolution; + + public: + // Needs to be public because the bindings code pokes at it. + js::ExpandoAndGeneration mExpandoAndGeneration; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocument, NS_IDOCUMENT_IID) diff --git a/layout/style/ServoBindings.toml b/layout/style/ServoBindings.toml index e32a92a792c7..25371c9934d8 100644 --- a/layout/style/ServoBindings.toml +++ b/layout/style/ServoBindings.toml @@ -49,11 +49,6 @@ hide-types = [ "nsString", ".*char_traits", ".*incompatible_char_type", - # JS::Value uses alignas(8) which bindgen can't represent correctly on Linux - # 32-bit. See https://github.com/rust-lang-nursery/rust-bindgen/issues/917. - # It's also not used by Stylo. The following types are also hidden for - # making use of it and being similarly unused by Stylo. - "JS::Value", "mozilla::binding_danger::TErrorResult.*", "mozilla::ErrorResult.*", # Causes JSWhyMagic to be included & handled incorrectly. "mozilla::dom::CallbackFunction",