mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-26 03:01:33 +00:00
Fix codegen of consuming setters/getters (#2172)
Make sure they reset their internal pointer to null after we call Rust since it invalidates the Rust pointer after being called! Closes #2168
This commit is contained in:
@ -25,6 +25,14 @@ impl Fruit {
|
||||
pub fn rot(self) {
|
||||
drop(self);
|
||||
}
|
||||
|
||||
#[wasm_bindgen(getter)]
|
||||
pub fn prop(self) -> u32 {
|
||||
0
|
||||
}
|
||||
|
||||
#[wasm_bindgen(setter)]
|
||||
pub fn set_prop(self, _val: u32) {}
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
|
Reference in New Issue
Block a user