Bug 1551991 - followup: Don't derive the destructor of CounterSpeakAs so that we can return it safely by value in Win32. r=me
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 17 May 2019 05:23:26 +0200
changeset 474285 41abcc2640371974e4067240da2885ddcf0a805c
parent 474284 ba078373f2c242bdada0f3cd73a2b28b03029480
child 474286 c5180b76c35305e08385c338101b6f7e18ae1641
push id36027
push usershindli@mozilla.com
push dateFri, 17 May 2019 16:24:38 +0000
treeherdermozilla-central@c94c54aff466 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1551991
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1551991 - followup: Don't derive the destructor of CounterSpeakAs so that we can return it safely by value in Win32. r=me
servo/ports/geckolib/glue.rs
--- a/servo/ports/geckolib/glue.rs
+++ b/servo/ports/geckolib/glue.rs
@@ -3113,16 +3113,20 @@ pub unsafe extern "C" fn Servo_CounterSt
                     symbol: symbol_to_string(&s.symbol),
                 }
             }).collect(),
             None => style::OwnedSlice::default(),
         };
     })
 }
 
+/// 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,
     Auto,
     Bullets,
     Numbers,
     Words,
     Ident(*mut nsAtom),