From f68cdd36794801cf50b0cee415e0451590dfb7e5 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Thu, 12 May 2016 10:33:44 -0700 Subject: [PATCH] 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. --- ports/geckolib/properties.mako.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/geckolib/properties.mako.rs b/ports/geckolib/properties.mako.rs index 6c21856cf60..6c6a48c3dd2 100644 --- a/ports/geckolib/properties.mako.rs +++ b/ports/geckolib/properties.mako.rs @@ -340,7 +340,7 @@ impl Drop for ${style_struct.gecko_struct_name} { impl Clone for ${style_struct.gecko_struct_name} { fn clone(&self) -> Self { 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); result }