Rewrite weakrefs to use current proposal

This commit is contained in:
Gus Caplan
2019-05-26 09:30:33 -05:00
parent 62b313d695
commit 66ade77720
3 changed files with 29 additions and 52 deletions

View File

@ -488,8 +488,8 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
if self.cx.config.weak_refs {
self.ret_expr.push_str(&format!(
"\
addCleanup(this, this.ptr, free{});
",
{}FinalizationGroup.register(this, this.ptr, this.ptr);
",
name
));
}