Bug 1444580: Mark JS::Value as opaque instead of hidden. r=xidorn
The next commit will move js::ExpandoAndGeneration (which contains a JS::Value)
into nsIDocument instead of nsDocument, so it needs to be defined.
I plan to land this after
https://github.com/rust-lang-nursery/rust-bindgen/pull/1271, so it shouldn't
break anything.
MozReview-Commit-ID: Kwu21AqFbPv
--- a/layout/style/ServoBindings.toml
+++ b/layout/style/ServoBindings.toml
@@ -93,30 +93,22 @@ 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 and JS::UninitializedValue use 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",
- "JS::UninitializedValue",
"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",
"mozilla::OriginFlags",
]
rusty-enums = [
"nsCompatibility",
@@ -379,16 +371,19 @@ whitelist-types = [
"mozilla::ParsingMode",
"mozilla::InheritTarget",
"mozilla::ServoDeclarationBlock",
"mozilla::ServoMediaList",
"mozilla::StyleRuleInclusion",
"nsStyleTransformMatrix::MatrixTransformOperator",
]
opaque-types = [
+ "JS::Value",
+ "JS::UninitializedValue",
+
"std::pair__PCCP",
"std::namespace::atomic___base", "std::atomic__My_base",
"std::atomic",
"std::atomic___base",
# We want everything but FontVariation and Float to be opaque but we don't
# have negative regexes.
"mozilla::gfx::(.{0,4}|.{6,12}|.{14,}|([^F][^o][^n][^t][^V][^a][^r][^i][^a][^t][^i][^o][^n])|([^F][^l][^o][^a][^t]))",
"mozilla::dom::Sequence",