mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
style: Work around a bindgen bug on Android.
Bug: 1466406 Reviewed-by: xidorn MozReview-Commit-ID: 2lltjH7IoZu
This commit is contained in:
parent
f829300751
commit
8d069d127a
1 changed files with 17 additions and 1 deletions
|
@ -1118,7 +1118,23 @@ impl<'le> TElement for GeckoElement<'le> {
|
|||
assert_eq!(base as *const _, self.0 as *const _, "Bad cast");
|
||||
}
|
||||
|
||||
let assigned_nodes: &[structs::RefPtr<structs::nsINode>] = &*slot.mAssignedNodes;
|
||||
// FIXME(emilio): Workaround a bindgen bug on Android that causes
|
||||
// mAssignedNodes to be at the wrong offset. See bug 1466406.
|
||||
//
|
||||
// Bug 1466580 tracks running the Android layout tests on automation.
|
||||
//
|
||||
// The actual bindgen bug still needs reduction.
|
||||
let assigned_nodes: &[structs::RefPtr<structs::nsINode>] =
|
||||
if !cfg!(target_os = "android") {
|
||||
debug_assert_eq!(
|
||||
unsafe { bindings::Gecko_GetAssignedNodes(self.0) },
|
||||
&slot.mAssignedNodes as *const _,
|
||||
);
|
||||
|
||||
&*slot.mAssignedNodes
|
||||
} else {
|
||||
unsafe { &**bindings::Gecko_GetAssignedNodes(self.0) }
|
||||
};
|
||||
|
||||
debug_assert_eq!(
|
||||
mem::size_of::<structs::RefPtr<structs::nsINode>>(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue