mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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 -->
This commit is contained in:
commit
c2beb55c0f
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} {
|
||||
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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue