mirror of
https://github.com/servo/servo.git
synced 2025-09-20 11:50:09 +01:00
Only use zeroed memory for gecko style structs, not the wrapper servo struct, so that we don't clobber the drop flags.
This is a regression from #11121.
This commit is contained in:
parent
42141870e7
commit
f68cdd3679
1 changed files with 1 additions and 1 deletions
|
@ -340,7 +340,7 @@ impl Drop for ${style_struct.gecko_struct_name} {
|
||||||
impl Clone for ${style_struct.gecko_struct_name} {
|
impl Clone for ${style_struct.gecko_struct_name} {
|
||||||
fn clone(&self) -> Self {
|
fn clone(&self) -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
let mut result: Self = zeroed();
|
let mut result = ${style_struct.gecko_struct_name} { gecko: zeroed() };
|
||||||
Gecko_CopyConstruct_${style_struct.gecko_ffi_name}(&mut result.gecko, &self.gecko);
|
Gecko_CopyConstruct_${style_struct.gecko_ffi_name}(&mut result.gecko, &self.gecko);
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue