- Revision
- 288064
- Author
- [email protected]
- Date
- 2022-01-15 13:17:40 -0800 (Sat, 15 Jan 2022)
Log Message
[JSC] Fix misc WebAssembly.Table issues
https://bugs.webkit.org/show_bug.cgi?id=235262
Reviewed by Alexey Shvayka.
LayoutTests/imported/w3c:
Fix length of WebAssembly.Table.set from 2 to 1.
According to the spec[1], it should be 1 since the second argument is an optional.
Also fix stray argument test. Previously, it was stray argument. But after the update
of the wasm spec, the second argument of Table constructor can be used for initial value.
So, WebAssembly.Table "anyfunc" with {} initial value throws an error since it is not
a function. This fixes a test, passing null for the second argument, and adding third
stray argument for the stray argument test.
[1]: https://webassembly.github.io/spec/js-api/index.html#tables
* web-platform-tests/wasm/jsapi/idlharness.any-expected.txt:
* web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt:
* web-platform-tests/wasm/jsapi/interface.any.js:
* web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt:
* web-platform-tests/wasm/jsapi/table/constructor.any.js:
(test):
* web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt:
Source/_javascript_Core:
* wasm/js/WebAssemblyTablePrototype.cpp:
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-01-15 21:17:40 UTC (rev 288064)
@@ -1,3 +1,29 @@
+2022-01-15 Yusuke Suzuki <[email protected]>
+
+ [JSC] Fix misc WebAssembly.Table issues
+ https://bugs.webkit.org/show_bug.cgi?id=235262
+
+ Reviewed by Alexey Shvayka.
+
+ Fix length of WebAssembly.Table.set from 2 to 1.
+ According to the spec[1], it should be 1 since the second argument is an optional.
+
+ Also fix stray argument test. Previously, it was stray argument. But after the update
+ of the wasm spec, the second argument of Table constructor can be used for initial value.
+ So, WebAssembly.Table "anyfunc" with {} initial value throws an error since it is not
+ a function. This fixes a test, passing null for the second argument, and adding third
+ stray argument for the stray argument test.
+
+ [1]: https://webassembly.github.io/spec/js-api/index.html#tables
+
+ * web-platform-tests/wasm/jsapi/idlharness.any-expected.txt:
+ * web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt:
+ * web-platform-tests/wasm/jsapi/interface.any.js:
+ * web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt:
+ * web-platform-tests/wasm/jsapi/table/constructor.any.js:
+ (test):
+ * web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt:
+
2022-01-15 Alan Bujtas <[email protected]>
web-platform-tests/html/rendering/dimension-attributes.html is failing when table width is set to 0px
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any-expected.txt (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any-expected.txt 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any-expected.txt 2022-01-15 21:17:40 UTC (rev 288064)
@@ -60,7 +60,7 @@
PASS Table interface: existence and properties of interface prototype object's @@unscopables property
PASS Table interface: operation grow(unsigned long, optional any)
PASS Table interface: operation get(unsigned long)
-FAIL Table interface: operation set(unsigned long, optional any) assert_equals: property has wrong .length expected 1 but got 2
+PASS Table interface: operation set(unsigned long, optional any)
PASS Table interface: attribute length
PASS Global interface: existence and properties of interface object
PASS Global interface object length
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/idlharness.any.worker-expected.txt 2022-01-15 21:17:40 UTC (rev 288064)
@@ -60,7 +60,7 @@
PASS Table interface: existence and properties of interface prototype object's @@unscopables property
PASS Table interface: operation grow(unsigned long, optional any)
PASS Table interface: operation get(unsigned long)
-FAIL Table interface: operation set(unsigned long, optional any) assert_equals: property has wrong .length expected 1 but got 2
+PASS Table interface: operation set(unsigned long, optional any)
PASS Table interface: attribute length
PASS Global interface: existence and properties of interface object
PASS Global interface object length
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/interface.any.js (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/interface.any.js 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/interface.any.js 2022-01-15 21:17:40 UTC (rev 288064)
@@ -143,7 +143,7 @@
test_operations(WebAssembly.Table.prototype, "WebAssembly.Table", [
["grow", 1],
["get", 1],
- ["set", 2],
+ ["set", 1],
]);
test_attributes(WebAssembly.Table.prototype, "WebAssembly.Table", [
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any-expected.txt 2022-01-15 21:17:40 UTC (rev 288064)
@@ -22,7 +22,7 @@
PASS Initial value exceeds maximum
PASS Basic (zero)
PASS Basic (non-zero)
-FAIL Stray argument WebAssembly.Table.prototype.constructor expects the second argument to be null or an instance of WebAssembly.Function
+PASS Stray argument
PASS Proxy descriptor
PASS Type conversion for descriptor.element
PASS Order of evaluation for descriptor
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.js (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.js 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.js 2022-01-15 21:17:40 UTC (rev 288064)
@@ -89,7 +89,7 @@
test(() => {
const argument = { "element": "anyfunc", "initial": 0 };
- const table = new WebAssembly.Table(argument, {});
+ const table = new WebAssembly.Table(argument, null, {});
assert_Table(table, { "length": 0 });
}, "Stray argument");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt (288063 => 288064)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/wasm/jsapi/table/constructor.any.worker-expected.txt 2022-01-15 21:17:40 UTC (rev 288064)
@@ -22,7 +22,7 @@
PASS Initial value exceeds maximum
PASS Basic (zero)
PASS Basic (non-zero)
-FAIL Stray argument WebAssembly.Table.prototype.constructor expects the second argument to be null or an instance of WebAssembly.Function
+PASS Stray argument
PASS Proxy descriptor
PASS Type conversion for descriptor.element
PASS Order of evaluation for descriptor
Modified: trunk/Source/_javascript_Core/ChangeLog (288063 => 288064)
--- trunk/Source/_javascript_Core/ChangeLog 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/Source/_javascript_Core/ChangeLog 2022-01-15 21:17:40 UTC (rev 288064)
@@ -1,3 +1,12 @@
+2022-01-15 Yusuke Suzuki <[email protected]>
+
+ [JSC] Fix misc WebAssembly.Table issues
+ https://bugs.webkit.org/show_bug.cgi?id=235262
+
+ Reviewed by Alexey Shvayka.
+
+ * wasm/js/WebAssemblyTablePrototype.cpp:
+
2022-01-14 Yusuke Suzuki <[email protected]> and Mikhail R. Gadelha <[email protected]>
[JSC] Fix Linux 64bit compilation
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp (288063 => 288064)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp 2022-01-15 20:32:22 UTC (rev 288063)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyTablePrototype.cpp 2022-01-15 21:17:40 UTC (rev 288064)
@@ -55,7 +55,7 @@
length webAssemblyTableProtoGetterLength ReadOnly|CustomAccessor
grow webAssemblyTableProtoFuncGrow Function 1
get webAssemblyTableProtoFuncGet Function 1
- set webAssemblyTableProtoFuncSet Function 2
+ set webAssemblyTableProtoFuncSet Function 1
type webAssemblyTableProtoFuncType Function 0
@end
*/