зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1551991 - followup: Give up on passing CounterSpeakAs by value since the previous patch busted non-Windows platforms.
CLOSED TREE
This commit is contained in:
Родитель
5436d3561e
Коммит
659be28594
|
@ -1338,7 +1338,8 @@ void CustomCounterStyle::ComputeRawSpeakAs(uint8_t& aSpeakAs,
|
|||
NS_ASSERTION(!(mFlags & FLAG_SPEAKAS_INITED),
|
||||
"ComputeRawSpeakAs is called with speak-as inited.");
|
||||
|
||||
auto speakAs = Servo_CounterStyleRule_GetSpeakAs(mRule);
|
||||
auto speakAs = StyleCounterSpeakAs::None();
|
||||
Servo_CounterStyleRule_GetSpeakAs(mRule, &speakAs);
|
||||
switch (speakAs.tag) {
|
||||
case StyleCounterSpeakAs::Tag::Auto:
|
||||
aSpeakAs = GetSpeakAsAutoValue();
|
||||
|
|
|
@ -3118,10 +3118,6 @@ pub unsafe extern "C" fn Servo_CounterStyleRule_GetAdditiveSymbols(
|
|||
})
|
||||
}
|
||||
|
||||
/// Don't derive destructors so that it's POD and we can pass it by value
|
||||
/// without issues.
|
||||
///
|
||||
/// cbindgen:derive-tagged-enum-destructor=false
|
||||
#[repr(C, u8)]
|
||||
pub enum CounterSpeakAs {
|
||||
None,
|
||||
|
@ -3135,9 +3131,10 @@ pub enum CounterSpeakAs {
|
|||
#[no_mangle]
|
||||
pub unsafe extern "C" fn Servo_CounterStyleRule_GetSpeakAs(
|
||||
rule: &RawServoCounterStyleRule,
|
||||
) -> CounterSpeakAs {
|
||||
out: &mut CounterSpeakAs,
|
||||
) {
|
||||
use style::counter_style::SpeakAs;
|
||||
read_locked_arc(rule, |rule: &CounterStyleRule| {
|
||||
*out = read_locked_arc(rule, |rule: &CounterStyleRule| {
|
||||
let speak_as = match rule.speak_as() {
|
||||
Some(s) => s,
|
||||
None => return CounterSpeakAs::None,
|
||||
|
@ -3149,7 +3146,7 @@ pub unsafe extern "C" fn Servo_CounterStyleRule_GetSpeakAs(
|
|||
SpeakAs::Words => CounterSpeakAs::Words,
|
||||
SpeakAs::Other(ref other) => CounterSpeakAs::Ident(other.0.as_ptr()),
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
|
|
Загрузка…
Ссылка в новой задаче