Skip to content

Commit 0286e80

Browse files
gahaaschromium-wpt-export-bot
authored andcommitted
[wpt][wasm] Fix type string of function references
The type string for function references is "anyfunc" and not "funcref", see https://webassembly.github.io/spec/js-api/index.html#dom-valuetype-anyfunc. This CL replaces the invalid "funcref" string with the valid "anyfunc" string in the wasm/global/type... test. Bug: v8:12227 Change-Id: I8c0709036beba3aa6e8418ca4fa9bc16fd67b914 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3162136 Commit-Queue: Andreas Haas <[email protected]> Reviewed-by: Michael Lippautz <[email protected]> Cr-Commit-Position: refs/heads/main@{#922052}
1 parent 38413c5 commit 0286e80

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

wasm/jsapi/global/type.tentative.any.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,19 +43,19 @@ test(() => {
4343

4444
test(() => {
4545
assert_type({"value": "externref", "mutable": true})
46-
}, "anyref, mutable")
46+
}, "externref, mutable")
4747

4848
test(() => {
4949
assert_type({"value": "externref", "mutable": false})
50-
}, "anyref, immutable")
50+
}, "externref, immutable")
5151

5252
test(() => {
53-
assert_type({"value": "funcref", "mutable": true})
54-
}, "funcref, mutable")
53+
assert_type({"value": "anyfunc", "mutable": true})
54+
}, "anyfunc, mutable")
5555

5656
test(() => {
57-
assert_type({"value": "funcref", "mutable": false})
58-
}, "funcref, immutable")
57+
assert_type({"value": "anyfunc", "mutable": false})
58+
}, "anyfunc, immutable")
5959

6060
test(() => {
6161
const myglobal = new WebAssembly.Global({"value": "i32", "mutable": true});

wasm/jsapi/table/type.tentative.any.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ function assert_type(argument) {
1010
}
1111

1212
test(() => {
13-
assert_type({ "minimum": 0, "element": "funcref"});
13+
assert_type({ "minimum": 0, "element": "anyfunc"});
1414
}, "Zero initial, no maximum");
1515

1616
test(() => {
17-
assert_type({ "minimum": 5, "element": "funcref" });
17+
assert_type({ "minimum": 5, "element": "anyfunc" });
1818
}, "Non-zero initial, no maximum");
1919

2020
test(() => {
21-
assert_type({ "minimum": 0, "maximum": 0, "element": "funcref" });
21+
assert_type({ "minimum": 0, "maximum": 0, "element": "anyfunc" });
2222
}, "Zero maximum");
2323

2424
test(() => {
25-
assert_type({ "minimum": 0, "maximum": 5, "element": "funcref" });
25+
assert_type({ "minimum": 0, "maximum": 5, "element": "anyfunc" });
2626
}, "None-zero maximum");

0 commit comments

Comments
 (0)