--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -82,16 +82,28 @@ raw-lines = [
"pub use self::root::mozilla::dom::*;",
"use atomic_refcell::AtomicRefCell;",
"use data::ElementData;",
]
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",
+ "mozilla::dom::CallbackObject.*",
+ "nsINode_ErrorResult",
+ "nsDOMAttributeMap_ErrorResult",
+ # End of JS::Value related types
]
bitfield-enums = [
"nsChangeHint",
"nsRestyleHint",
"OriginFlags",
]
constified-enums = [
"UpdateAnimationsTasks",
@@ -320,19 +332,20 @@ opaque-types = [
"nsIPresShell_ScrollAxis", # <- For some reason the alignment of this is 4
# for clang.
"nsPIDOMWindow", # <- Takes the vtable from a template parameter, and we can't
# generate it conditionally.
"JS::Rooted",
"mozilla::Maybe",
"gfxSize", # <- union { struct { T width; T height; }; T components[2] };
"gfxSize_Super", # Ditto.
- "mozilla::ErrorResult", # Causes JSWhyMagic to be included & handled incorrectly.
"mozilla::StyleAnimationValue",
"StyleAnimationValue", # pulls in a whole bunch of stuff we don't need in the bindings
+ "mozilla::dom::.*Callback", # Pulls in ErrorResult and other things that
+ # don't align properly on Linux 32-bit
]
mapped-generic-types = [
{ generic = true, gecko = "mozilla::ServoUnsafeCell", servo = "::std::cell::UnsafeCell" },
{ generic = true, gecko = "mozilla::ServoCell", servo = "::std::cell::Cell" },
{ generic = false, gecko = "ServoNodeData", servo = "AtomicRefCell<ElementData>" },
{ generic = false, gecko = "mozilla::ServoWritingMode", servo = "::logical_geometry::WritingMode" },
{ generic = false, gecko = "mozilla::ServoFontComputationData", servo = "::properties::FontComputationData" },
{ generic = false, gecko = "mozilla::ServoCustomPropertiesMap", servo = "Option<::servo_arc::Arc<::custom_properties::CustomPropertiesMap>>" },