From d4d2cb3a35834a4f9e30132b5dc67b4a5fa4c201 Mon Sep 17 00:00:00 2001 From: Ryan Hunt Date: Mon, 31 Jan 2022 15:03:52 +0000 Subject: [PATCH] Bug 1750040 - wasm: Enable wasm exception handling in nightly. r=lth Differential Revision: https://phabricator.services.mozilla.com/D136630 --- .../test/test_serviceworker_interfaces.js | 10 +++ .../mochitest/general/test_interfaces.js | 10 +++ dom/workers/test/test_worker_interfaces.js | 10 +++ js/public/WasmFeatures.h | 2 +- modules/libpref/init/StaticPrefList.yaml | 2 +- .../exception/basic.tentative.any.js.ini | 75 ++++++++++++------- .../constructor.tentative.any.js.ini | 36 ++++++--- .../exception/getArg.tentative.any.js.ini | 45 +++++++---- .../jsapi/exception/is.tentative.any.js.ini | 27 ++++--- .../exception/toString.tentative.any.js.ini | 18 +++-- .../tag/constructor.tentative.any.js.ini | 18 +++-- .../jsapi/tag/toString.tentative.any.js.ini | 18 +++-- .../wasm/jsapi/tag/type.tentative.any.js.ini | 27 ++++--- 13 files changed, 208 insertions(+), 90 deletions(-) diff --git a/dom/serviceworkers/test/test_serviceworker_interfaces.js b/dom/serviceworkers/test/test_serviceworker_interfaces.js index 5aa6a298267a9..37a5a60e4192b 100644 --- a/dom/serviceworkers/test/test_serviceworker_interfaces.js +++ b/dom/serviceworkers/test/test_serviceworker_interfaces.js @@ -40,6 +40,16 @@ var wasmGlobalInterfaces = [ insecureContext: true, nightly: true, }, + { + name: "Exception", + insecureContext: true, + nightly: true, + }, + { + name: "Tag", + insecureContext: true, + nightly: true, + }, ]; // IMPORTANT: Do not change this list without review from // a JavaScript Engine peer! diff --git a/dom/tests/mochitest/general/test_interfaces.js b/dom/tests/mochitest/general/test_interfaces.js index 4f1a73d4fe27b..1254333815f3d 100644 --- a/dom/tests/mochitest/general/test_interfaces.js +++ b/dom/tests/mochitest/general/test_interfaces.js @@ -68,6 +68,16 @@ var wasmGlobalInterfaces = [ insecureContext: true, nightly: true, }, + { + name: "Exception", + insecureContext: true, + nightly: true, + }, + { + name: "Tag", + insecureContext: true, + nightly: true, + }, ]; // IMPORTANT: Do not change this list without review from // a JavaScript Engine peer! diff --git a/dom/workers/test/test_worker_interfaces.js b/dom/workers/test/test_worker_interfaces.js index 51a01ea71d720..632259c9e6cd4 100644 --- a/dom/workers/test/test_worker_interfaces.js +++ b/dom/workers/test/test_worker_interfaces.js @@ -46,6 +46,16 @@ var wasmGlobalInterfaces = [ insecureContext: true, nightly: true, }, + { + name: "Exception", + insecureContext: true, + nightly: true, + }, + { + name: "Tag", + insecureContext: true, + nightly: true, + }, ]; // IMPORTANT: Do not change this list without review from // a JavaScript Engine peer! diff --git a/js/public/WasmFeatures.h b/js/public/WasmFeatures.h index 6df86639466d4..1e68587a90bc0 100644 --- a/js/public/WasmFeatures.h +++ b/js/public/WasmFeatures.h @@ -113,7 +113,7 @@ /* flag predicate */ true, \ /* shell flag */ "extended-const", \ /* preference name */ "extended_const") \ - EXPERIMENTAL( \ + TENTATIVE( \ /* capitalized name */ Exceptions, \ /* lower case name */ exceptions, \ /* compile predicate */ WASM_EXCEPTIONS_ENABLED, \ diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index 02f25d101a7ac..8f59ae5ed82c1 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -6666,7 +6666,7 @@ #if defined(ENABLE_WASM_EXCEPTIONS) - name: javascript.options.wasm_exceptions type: bool - value: false + value: @IS_NIGHTLY_BUILD@ mirror: always #endif // defined(ENABLE_WASM_EXCEPTIONS) diff --git a/testing/web-platform/meta/wasm/jsapi/exception/basic.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/exception/basic.tentative.any.js.ini index 92126faf11ebe..5d07e1e13527b 100644 --- a/testing/web-platform/meta/wasm/jsapi/exception/basic.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/exception/basic.tentative.any.js.ini @@ -1,83 +1,108 @@ [basic.tentative.any.worker.html] [Wasm function throws argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws null] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws integer] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws, Wasm catches and rethrows] - expected: FAIL + expected: + if release_or_beta: FAIL [basic.tentative.any.serviceworker.html] [Wasm function throws argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws null] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws integer] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws, Wasm catches and rethrows] - expected: FAIL + expected: + if release_or_beta: FAIL [basic.tentative.any.sharedworker.html] [Wasm function throws argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws null] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws integer] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws, Wasm catches and rethrows] - expected: FAIL + expected: + if release_or_beta: FAIL [basic.tentative.any.html] [Wasm function throws argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws null] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws integer] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws, Wasm catches and rethrows] - expected: FAIL + expected: + if release_or_beta: FAIL [basic.tentative.any.js] [Wasm function throws argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws null] - expected: FAIL + expected: + if release_or_beta: FAIL [Wasm function throws integer] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws] - expected: FAIL + expected: + if release_or_beta: FAIL [Imported JS function throws, Wasm catches and rethrows] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/exception/constructor.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/exception/constructor.tentative.any.js.ini index 2ba9aa675f6d1..242acc9fbf954 100644 --- a/testing/web-platform/meta/wasm/jsapi/exception/constructor.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/exception/constructor.tentative.any.js.ini @@ -1,40 +1,52 @@ [constructor.tentative.any.worker.html] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL [Calling] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [constructor.tentative.any.html] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL [Calling] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [constructor.tentative.any.js] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL [Calling] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/exception/getArg.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/exception/getArg.tentative.any.js.ini index 6ef00a5a5c1c2..502d3199eda21 100644 --- a/testing/web-platform/meta/wasm/jsapi/exception/getArg.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/exception/getArg.tentative.any.js.ini @@ -1,49 +1,64 @@ [getArg.tentative.any.worker.html] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Index out of bounds] - expected: FAIL + expected: + if release_or_beta: FAIL [Getting out-of-range argument] - expected: FAIL + expected: + if release_or_beta: FAIL [getArg] - expected: FAIL + expected: + if release_or_beta: FAIL [getArg.tentative.any.html] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Index out of bounds] - expected: FAIL + expected: + if release_or_beta: FAIL [Getting out-of-range argument] - expected: FAIL + expected: + if release_or_beta: FAIL [getArg] - expected: FAIL + expected: + if release_or_beta: FAIL [getArg.tentative.any.js] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [Index out of bounds] - expected: FAIL + expected: + if release_or_beta: FAIL [Getting out-of-range argument] - expected: FAIL + expected: + if release_or_beta: FAIL [getArg] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/exception/is.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/exception/is.tentative.any.js.ini index 9fff3d6c400b1..85dca1738f152 100644 --- a/testing/web-platform/meta/wasm/jsapi/exception/is.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/exception/is.tentative.any.js.ini @@ -1,31 +1,40 @@ [is.tentative.any.html] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [is] - expected: FAIL + expected: + if release_or_beta: FAIL [is.tentative.any.worker.html] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [is] - expected: FAIL + expected: + if release_or_beta: FAIL [is.tentative.any.js] [Missing arguments] - expected: FAIL + expected: + if release_or_beta: FAIL [Invalid exception argument] - expected: FAIL + expected: + if release_or_beta: FAIL [is] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/exception/toString.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/exception/toString.tentative.any.js.ini index 7e0fdb242016f..1ccf5cea40d6c 100644 --- a/testing/web-platform/meta/wasm/jsapi/exception/toString.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/exception/toString.tentative.any.js.ini @@ -1,22 +1,28 @@ [toString.tentative.any.worker.html] [Object.prototype.toString on an Exception] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL [toString.tentative.any.html] [Object.prototype.toString on an Exception] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL [toString.tentative.any.js] [Object.prototype.toString on an Exception] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/tag/constructor.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/tag/constructor.tentative.any.js.ini index e8dbf47746c77..dce9a998eedd9 100644 --- a/testing/web-platform/meta/wasm/jsapi/tag/constructor.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/tag/constructor.tentative.any.js.ini @@ -1,20 +1,26 @@ [constructor.tentative.any.worker.html] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL [constructor.tentative.any.html] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL [constructor.tentative.any.js] [name] - expected: FAIL + expected: + if release_or_beta: FAIL [length] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/tag/toString.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/tag/toString.tentative.any.js.ini index 5205a1a62b603..56f8309ae57d1 100644 --- a/testing/web-platform/meta/wasm/jsapi/tag/toString.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/tag/toString.tentative.any.js.ini @@ -1,22 +1,28 @@ [toString.tentative.any.html] [Object.prototype.toString on a Tag] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL [toString.tentative.any.worker.html] [Object.prototype.toString on a Tag] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL [toString.tentative.any.js] [Object.prototype.toString on a Tag] - expected: FAIL + expected: + if release_or_beta: FAIL [@@toStringTag exists on the prototype with the appropriate descriptor] - expected: FAIL + expected: + if release_or_beta: FAIL diff --git a/testing/web-platform/meta/wasm/jsapi/tag/type.tentative.any.js.ini b/testing/web-platform/meta/wasm/jsapi/tag/type.tentative.any.js.ini index 0e2b960c33523..325116fa265a9 100644 --- a/testing/web-platform/meta/wasm/jsapi/tag/type.tentative.any.js.ini +++ b/testing/web-platform/meta/wasm/jsapi/tag/type.tentative.any.js.ini @@ -1,31 +1,40 @@ [type.tentative.any.worker.html] [[\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64 f32 f64\]] - expected: FAIL + expected: + if release_or_beta: FAIL [type.tentative.any.html] [[\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64 f32 f64\]] - expected: FAIL + expected: + if release_or_beta: FAIL [type.tentative.any.js] [[\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64\]] - expected: FAIL + expected: + if release_or_beta: FAIL [[i32 i64 f32 f64\]] - expected: FAIL + expected: + if release_or_beta: FAIL