mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1392447 - Fix up Servo_StyleSheet_GetOrigin for Linux 32-bit ABI. r=emilio
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at the moment because they wrap the value in a struct. This causes the Rust side to believe the caller will pass along space for the struct return value, while C++ believes it's just an integer value. MozReview-Commit-ID: JHDp0XAmQCG
This commit is contained in:
parent
000285b465
commit
2c635e5c43
@ -55,8 +55,10 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_Clone, RawServoStyleSheetContentsStrong,
|
||||
SERVO_BINDING_FUNC(Servo_StyleSheet_SizeOfIncludingThis, size_t,
|
||||
mozilla::MallocSizeOf malloc_size_of,
|
||||
RawServoStyleSheetContentsBorrowed sheet)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSheet_GetOrigin,
|
||||
mozilla::OriginFlags,
|
||||
// We'd like to return `OriginFlags` here, but bindgen bitfield enums don't
|
||||
// work as return values with the Linux 32-bit ABI at the moment because
|
||||
// they wrap the value in a struct.
|
||||
SERVO_BINDING_FUNC(Servo_StyleSheet_GetOrigin, uint8_t,
|
||||
RawServoStyleSheetContentsBorrowed sheet)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_Init, RawServoStyleSet*, RawGeckoPresContextOwned pres_context)
|
||||
SERVO_BINDING_FUNC(Servo_StyleSet_RebuildCachedData, void,
|
||||
|
@ -466,7 +466,8 @@ ServoStyleSheet::SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
OriginFlags
|
||||
ServoStyleSheet::GetOrigin()
|
||||
{
|
||||
return Servo_StyleSheet_GetOrigin(Inner()->mContents);
|
||||
return static_cast<OriginFlags>(
|
||||
Servo_StyleSheet_GetOrigin(Inner()->mContents));
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user