summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/wasm/webapi/esm-integration/resources/wasm-js-cycle.js
blob: 161edab4f6f1f15c2184d0284e49a9d91401a50c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import * as mod from "./wasm-js-cycle.wasm";

let jsGlob = new WebAssembly.Global({ value: "i32", mutable: true }, 42);
let jsMem = new WebAssembly.Memory({ initial: 10 });
let jsTab = new WebAssembly.Table({ initial: 10, element: "anyfunc" });
let jsFunc = () => { return 42; };

export { jsGlob, jsMem, jsTab, jsFunc };

export function mutateBindings() {
  jsGlob = 0;
  jsMem = 0;
  jsTab = 0;
  jsFunc = 0;
}