You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #5886 from Cellule:users/micfer/wasm-spec-constructor
- Use TypeError instead of RangeError when initial/maximum have the wrong type (ie: not uint32).
- Check for NaN, Infinity and -Infinity for NonWrappingUint32 conversion
- Do not use HasProperty to see if the descriptor has a property, instead just use GetProperty and check against `undefined`. This is according to https://heycam.github.io/webidl/#dfn-present
- Convert Table `descriptor.element` to string before doing the comparison
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/microsoft/chakracore/5886)
<!-- Reviewable:end -->
Copy file name to clipboardExpand all lines: test/WasmSpec/baselines/testsuite/js-api/memory/constructor.any.baseline
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1,25 +1,25 @@
1
1
Harness Status: OK
2
-
Found 24 tests: Pass = 9 Fail = 15
2
+
Found 24 tests: Pass = 24
3
3
Pass name
4
4
Pass length
5
5
Pass No arguments
6
6
Pass Calling
7
-
Fail Invalid descriptor argument assert_throws: new Memory(object "[object Object]") function "() => new WebAssembly.Memory(invalidArgument)" did not throw
8
-
Fail Undefined initial value in descriptor assert_throws: function "() => new WebAssembly.Memory({ "initial": undefined })" did not throw
9
-
Fail Out-of-range initial value in descriptor: NaN assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" did not throw
10
-
Fail Out-of-range maximum value in descriptor: NaN assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" did not throw
11
-
Fail Out-of-range initial value in descriptor: Infinity assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
12
-
Fail Out-of-range maximum value in descriptor: Infinity assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
13
-
Fail Out-of-range initial value in descriptor: -Infinity assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
14
-
Fail Out-of-range maximum value in descriptor: -Infinity assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
15
-
Fail Out-of-range initial value in descriptor: -1 assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
16
-
Fail Out-of-range maximum value in descriptor: -1 assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
17
-
Fail Out-of-range initial value in descriptor: 4294967296 assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
18
-
Fail Out-of-range maximum value in descriptor: 4294967296 assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
19
-
Fail Out-of-range initial value in descriptor: 68719476736 assert_throws: function "() => new WebAssembly.Memory({ "initial": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
20
-
Fail Out-of-range maximum value in descriptor: 68719476736 assert_throws: function "() => new WebAssembly.Memory({ "initial": 0, "maximum": value })" threw object "RangeError: argument out of range" ("RangeError") expected object "TypeError" ("TypeError")
7
+
Pass Invalid descriptor argument
8
+
Pass Undefined initial value in descriptor
9
+
Pass Out-of-range initial value in descriptor: NaN
10
+
Pass Out-of-range maximum value in descriptor: NaN
11
+
Pass Out-of-range initial value in descriptor: Infinity
12
+
Pass Out-of-range maximum value in descriptor: Infinity
13
+
Pass Out-of-range initial value in descriptor: -Infinity
14
+
Pass Out-of-range maximum value in descriptor: -Infinity
15
+
Pass Out-of-range initial value in descriptor: -1
16
+
Pass Out-of-range maximum value in descriptor: -1
17
+
Pass Out-of-range initial value in descriptor: 4294967296
18
+
Pass Out-of-range maximum value in descriptor: 4294967296
19
+
Pass Out-of-range initial value in descriptor: 68719476736
20
+
Pass Out-of-range maximum value in descriptor: 68719476736
21
21
Pass Initial value exceeds maximum
22
-
Fail Proxy descriptor assert_unreached: Should not call [[HasProperty]] with maximum Reached unreachable code
0 commit comments