diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-12 11:36:42 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-12 11:36:42 -0700 |
commit | c2beb55c0f039d096241d677fb93bfa0a3b18e56 (patch) | |
tree | 70b3f8aec1bf53cc3f6728f30c01580ff3af997e | |
parent | e9270574783c44b193649d150a29090941d2c661 (diff) | |
parent | f68cdd36794801cf50b0cee415e0451590dfb7e5 (diff) | |
download | servo-c2beb55c0f039d096241d677fb93bfa0a3b18e56.tar.gz servo-c2beb55c0f039d096241d677fb93bfa0a3b18e56.zip |
Auto merge of #11160 - bholley:zero_gecko_struct, r=mbrubeck
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.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11160)
<!-- Reviewable:end -->
-rw-r--r-- | ports/geckolib/properties.mako.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 } |