Closed
Description
On my machine, the generated nsIDocument
is like this:
#[repr(C)]
#[derive(Debug)]
pub struct nsIDocument {
pub _base: root::nsINode,
pub _base_1: root::mozilla::dom::DispatcherTrait,
pub mDeprecationWarnedAbout: u64,
pub mDocWarningWarnedAbout: u32,
pub mSelectorCache: root::nsIDocument_SelectorCache,
pub __bindgen_padding_0: [u64; 10usize],
pub mReferrer: root::nsCString,
pub mLastModified: ::nsstring::nsStringRepr,
// ...
}
I see no reason why there needs to be a 80byte padding.
This causes a mismatch between offset from C++ and from Rust (mReferrer
's offset is 248 in C++ but 328 in Rust), which leads to servo/servo#15483 on Windows.
It seems that this doesn't happen on Mac or Linux, so --target=x86_64-pc-win32
is probably a necessary condition.
Metadata
Metadata
Assignees
Labels
No labels