Skip to content

Commit c04886d

Browse files
committed
proxy lol
1 parent 64a5d69 commit c04886d

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

read_type_data.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
const fs = require("fs/promises");
22

3+
function justSatisfyAllImportsLol() {
4+
return new Proxy(
5+
{},
6+
{
7+
get(_, name) {
8+
return new Proxy(
9+
{},
10+
{
11+
get(_, name) {
12+
return () => {};
13+
}
14+
}
15+
);
16+
}
17+
}
18+
);
19+
}
20+
321
async function main() {
422
const b = await fs.readFile(process.argv[2]);
5-
const { instance } = await WebAssembly.instantiate(b, {
6-
env: { abort() {} }
7-
});
23+
const { instance } = await WebAssembly.instantiate(
24+
b,
25+
justSatisfyAllImportsLol()
26+
);
827
const ptr = instance.exports.__asbind_type_data.value;
928
const dv = new DataView(instance.exports.memory.buffer);
1029
const strLen = dv.getUint32(ptr - 4, true);

0 commit comments

Comments
 (0)