| 193 | } |
| 194 | |
| 195 | function makeMutClosure(arg0, arg1, dtor, f) { |
| 196 | const state = { a: arg0, b: arg1, cnt: 1, dtor }; |
| 197 | const real = (...args) => { |
| 198 | // First up with a closure we increment the internal reference |
| 199 | // count. This ensures that the Rust closure environment won't |
| 200 | // be deallocated while we're invoking it. |
| 201 | state.cnt++; |
| 202 | const a = state.a; |
| 203 | state.a = 0; |
| 204 | try { |
| 205 | return f(a, state.b, ...args); |
| 206 | } finally { |
| 207 | if (--state.cnt === 0) { |
| 208 | wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); |
| 209 | |
| 210 | } else { |
| 211 | state.a = a; |
| 212 | } |
| 213 | } |
| 214 | }; |
| 215 | real.original = state; |
| 216 | |
| 217 | return real; |
| 218 | } |
| 219 | function __wbg_adapter_30(arg0, arg1, arg2) { |
| 220 | wasm.wasm_bindgen__convert__closures__invoke1_mut__h1c96eaa25d150746(arg0, arg1, addHeapObject(arg2)); |
| 221 | } |