From e977cec252bf133f5e4da18eb820ae4341cb409f Mon Sep 17 00:00:00 2001 From: Matthias Liedtke Date: Mon, 16 Mar 2026 15:36:39 +0100 Subject: [PATCH] [test][js-api] WebAssembly.Global.set should not throw without argument This change landed in the Web Platform Tests repository via: https://github.com/web-platform-tests/wpt/commit/5078da54e150d8d380062402eb09ada3aa0857fd Corresponding issue: https://github.com/WebAssembly/spec/issues/2075 --- test/js-api/global/value-get-set.any.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/js-api/global/value-get-set.any.js b/test/js-api/global/value-get-set.any.js index c4c058285c..2b63a173dc 100644 --- a/test/js-api/global/value-get-set.any.js +++ b/test/js-api/global/value-get-set.any.js @@ -131,7 +131,14 @@ test(() => { const setter = desc.set; assert_equals(typeof setter, "function"); - assert_throws_js(TypeError, () => setter.call(global)); + assert_equals(global.value, 0); + + assert_equals(setter.call(global, undefined), undefined); + assert_equals(global.value, 0); + + // Should behave as if 'undefined' was passed as the argument. + assert_equals(setter.call(global), undefined); + assert_equals(global.value, 0); }, "Calling setter without argument"); test(() => {