diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2017-09-15 04:05:20 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 04:05:20 -0500 |
commit | 70a6b2fa91ed377ce5d0d1696bfb1503be8aa454 (patch) | |
tree | b2282f6fb140c40c4647233975d68500d57601d9 /components/style/gecko/generated/structs_debug.rs | |
parent | edff65a3b8f761513929b932eb7e9ea8b03aca79 (diff) | |
parent | 1a57bad2a1bdfb631aeb4dc6bc17527274d9da5a (diff) | |
download | servo-70a6b2fa91ed377ce5d0d1696bfb1503be8aa454.tar.gz servo-70a6b2fa91ed377ce5d0d1696bfb1503be8aa454.zip |
Auto merge of #18516 - jdm:stringshare, r=heycam
Share specified URLs with Gecko
This makes use of our Arc offset machinery to allow Gecko to store Arc<String> values and ensure there are used appropriately.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix [bug 1397971](https://bugzilla.mozilla.org/show_bug.cgi?id=1397971).
<!-- 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/18516)
<!-- Reviewable:end -->
Diffstat (limited to 'components/style/gecko/generated/structs_debug.rs')
-rw-r--r-- | components/style/gecko/generated/structs_debug.rs | 79 |
1 files changed, 63 insertions, 16 deletions
diff --git a/components/style/gecko/generated/structs_debug.rs b/components/style/gecko/generated/structs_debug.rs index fec80394201..b269be0c0e8 100644 --- a/components/style/gecko/generated/structs_debug.rs +++ b/components/style/gecko/generated/structs_debug.rs @@ -1727,17 +1727,52 @@ pub mod root { pub vtable_: *const URLValueData__bindgen_vtable, pub mRefCnt: root::mozilla::ThreadSafeAutoRefCnt, pub mURI: root::nsMainThreadPtrHandle<root::nsIURI>, - pub mString: ::nsstring::nsStringRepr, pub mExtraData: root::RefPtr<root::mozilla::URLExtraData>, pub mURIResolved: bool, pub mIsLocalRef: [u8; 2usize], pub mMightHaveRef: [u8; 2usize], + pub mStrings: root::mozilla::css::URLValueData_RustOrGeckoString, + pub mUsingRustString: bool, } pub type URLValueData_HasThreadSafeRefCnt = root::mozilla::TrueType; + #[repr(C)] + #[derive(Debug)] + pub struct URLValueData_RustOrGeckoString { + pub mString: root::__BindgenUnionField<::nsstring::nsStringRepr>, + pub mRustString: root::__BindgenUnionField<::gecko_bindings::structs::ServoRawOffsetArc<root::RustString>>, + pub bindgen_union_field: [u64; 2usize], + } + #[test] + fn bindgen_test_layout_URLValueData_RustOrGeckoString() { + assert_eq!(::std::mem::size_of::<URLValueData_RustOrGeckoString>() + , 16usize , concat ! ( + "Size of: " , stringify ! ( + URLValueData_RustOrGeckoString ) )); + assert_eq! (::std::mem::align_of::<URLValueData_RustOrGeckoString>() + , 8usize , concat ! ( + "Alignment of " , stringify ! ( + URLValueData_RustOrGeckoString ) )); + assert_eq! (unsafe { + & ( + * ( 0 as * const URLValueData_RustOrGeckoString ) + ) . mString as * const _ as usize } , 0usize , + concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData_RustOrGeckoString ) , "::" , + stringify ! ( mString ) )); + assert_eq! (unsafe { + & ( + * ( 0 as * const URLValueData_RustOrGeckoString ) + ) . mRustString as * const _ as usize } , 0usize , + concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData_RustOrGeckoString ) , "::" , + stringify ! ( mRustString ) )); + } #[test] fn bindgen_test_layout_URLValueData() { - assert_eq!(::std::mem::size_of::<URLValueData>() , 56usize , + assert_eq!(::std::mem::size_of::<URLValueData>() , 64usize , concat ! ( "Size of: " , stringify ! ( URLValueData ) )); assert_eq! (::std::mem::align_of::<URLValueData>() , 8usize , @@ -1755,38 +1790,45 @@ pub mod root { "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mURI ) )); assert_eq! (unsafe { - & ( * ( 0 as * const URLValueData ) ) . mString as - * const _ as usize } , 24usize , concat ! ( - "Alignment of field: " , stringify ! ( - URLValueData ) , "::" , stringify ! ( mString ) - )); - assert_eq! (unsafe { & ( * ( 0 as * const URLValueData ) ) . mExtraData - as * const _ as usize } , 40usize , concat ! ( + as * const _ as usize } , 24usize , concat ! ( "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mExtraData ) )); assert_eq! (unsafe { & ( * ( 0 as * const URLValueData ) ) . - mURIResolved as * const _ as usize } , 48usize , + mURIResolved as * const _ as usize } , 32usize , concat ! ( "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mURIResolved ) )); assert_eq! (unsafe { & ( * ( 0 as * const URLValueData ) ) . - mIsLocalRef as * const _ as usize } , 49usize , + mIsLocalRef as * const _ as usize } , 33usize , concat ! ( "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mIsLocalRef ) )); assert_eq! (unsafe { & ( * ( 0 as * const URLValueData ) ) . - mMightHaveRef as * const _ as usize } , 51usize , + mMightHaveRef as * const _ as usize } , 35usize , concat ! ( "Alignment of field: " , stringify ! ( URLValueData ) , "::" , stringify ! ( mMightHaveRef ) )); + assert_eq! (unsafe { + & ( * ( 0 as * const URLValueData ) ) . mStrings + as * const _ as usize } , 40usize , concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData ) , "::" , stringify ! ( mStrings ) + )); + assert_eq! (unsafe { + & ( * ( 0 as * const URLValueData ) ) . + mUsingRustString as * const _ as usize } , 56usize + , concat ! ( + "Alignment of field: " , stringify ! ( + URLValueData ) , "::" , stringify ! ( + mUsingRustString ) )); } #[repr(C)] #[derive(Debug)] @@ -1795,7 +1837,7 @@ pub mod root { } #[test] fn bindgen_test_layout_URLValue() { - assert_eq!(::std::mem::size_of::<URLValue>() , 56usize , + assert_eq!(::std::mem::size_of::<URLValue>() , 64usize , concat ! ( "Size of: " , stringify ! ( URLValue ) )); assert_eq! (::std::mem::align_of::<URLValue>() , 8usize , @@ -1811,7 +1853,7 @@ pub mod root { } #[test] fn bindgen_test_layout_ImageValue() { - assert_eq!(::std::mem::size_of::<ImageValue>() , 112usize , + assert_eq!(::std::mem::size_of::<ImageValue>() , 120usize , concat ! ( "Size of: " , stringify ! ( ImageValue ) )); assert_eq! (::std::mem::align_of::<ImageValue>() , 8usize , @@ -1819,12 +1861,12 @@ pub mod root { "Alignment of " , stringify ! ( ImageValue ) )); assert_eq! (unsafe { & ( * ( 0 as * const ImageValue ) ) . mRequests as - * const _ as usize } , 56usize , concat ! ( + * const _ as usize } , 64usize , concat ! ( "Alignment of field: " , stringify ! ( ImageValue ) , "::" , stringify ! ( mRequests ) )); assert_eq! (unsafe { & ( * ( 0 as * const ImageValue ) ) . mLoadedImage - as * const _ as usize } , 104usize , concat ! ( + as * const _ as usize } , 112usize , concat ! ( "Alignment of field: " , stringify ! ( ImageValue ) , "::" , stringify ! ( mLoadedImage ) )); } @@ -28801,6 +28843,11 @@ pub mod root { } | ((mHadDispatch as u8 as u8) << 6usize) & (64u64 as u8)) } } + #[repr(C)] + #[derive(Debug, Copy, Clone)] + pub struct RustString { + _unused: [u8; 0], + } #[repr(u32)] #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum nsCSSUnit { |