Skip to content

Commit 6a1257e

Browse files
LiedtkeMs2ger
authored andcommitted
[test][js-api] WebAssembly.Global.<prototype>set should not throw without argument
This change landed in the Web Platform Tests repository via: web-platform-tests/wpt@5078da5 Corresponding issue: #2075
1 parent 6c2c638 commit 6a1257e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

test/js-api/global/value-get-set.any.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ test(() => {
131131
const setter = desc.set;
132132
assert_equals(typeof setter, "function");
133133

134-
assert_throws_js(TypeError, () => setter.call(global));
134+
assert_equals(global.value, 0);
135+
136+
assert_equals(setter.call(global, undefined), undefined);
137+
assert_equals(global.value, 0);
138+
139+
// Should behave as if 'undefined' was passed as the argument.
140+
assert_equals(setter.call(global), undefined);
141+
assert_equals(global.value, 0);
135142
}, "Calling setter without argument");
136143

137144
test(() => {

0 commit comments

Comments
 (0)