mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-17 06:09:19 +00:00
Bug 1932087: Check for WebAssembly.Function in memory64 test. r=yury
This is tied to the type reflections proposal and therefore shouldn't be used unless available. Differential Revision: https://phabricator.services.mozilla.com/D229491
This commit is contained in:
parent
a994ab4d81
commit
0e8410b888
@ -1771,17 +1771,19 @@ if (getBuildConfiguration("pointer-byte-size") == 8) {
|
||||
|
||||
// get / set
|
||||
const table64Tests = [
|
||||
{
|
||||
elem: "funcref",
|
||||
jsval: new WebAssembly.Function({ parameters: ["i32"], results: [] }, () => {}),
|
||||
wasmval: `(ref.func 0)`,
|
||||
},
|
||||
{
|
||||
elem: "anyref",
|
||||
jsval: "haha you cannot represent me",
|
||||
wasmval: `(struct.new_default $s)`,
|
||||
},
|
||||
];
|
||||
if (WebAssembly.Function) {
|
||||
table64Tests.push({
|
||||
elem: "funcref",
|
||||
jsval: new WebAssembly.Function({ parameters: ["i32"], results: [] }, () => {}),
|
||||
wasmval: `(ref.func 0)`,
|
||||
});
|
||||
}
|
||||
for (const test of table64Tests) {
|
||||
const externalTable = new WebAssembly.Table({ address: "i64", element: test.elem, initial: 2n });
|
||||
externalTable.set(0n, test.jsval);
|
||||
|
Loading…
x
Reference in New Issue
Block a user