The WebAssembly exception-handling proposal allows WebAssembly code to throw
and catch exceptions. This allows native programs that use exceptions to be
ported to the web without an expensive polyfill.
This feature has been enabled in Nightly behind a pref, and I intend to turn
this on by default in Firefox 100.
Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=wasm-exceptionsBug to turn on by default:
https://bugzilla.mozilla.org/show_bug.cgi?id=1759217Specification:
https://github.com/WebAssembly/exception-handling/Standards Body: WebAssembly Community Group
Platform coverage: All platforms that support WebAssembly
Preference: javascript.options.wasm_exceptions
DevTools bug: N/A
Other browsers:
* Chrome - Shipped in Chrome 95 (Oct 19, 2021)
* Safari - Shipped in Safari 15.2 (Dec 13, 2021)
web-platform-tests:
* There are web-platform-tests for this feature under `wasm/jsapi`
* There are also WebAssembly spec tests shared by all JS engines that test
this feature (js/src/jit-test/tests/wasm/spec/exception-handling)
This proposal is in Phase 3 of the WebAssembly Community Group. Phase 4 is
when a proposal would normally be considered ready to be released. We are
shipping now to maintain web compatibility with other browsers that have
already released this feature. We have asked and been granted an exception to
the exposure guidelines standardization requirements [1] from the technical
leadership module committee [2].
[1]
https://wiki.mozilla.org/ExposureGuidelines#Ensure_that_the_feature_is_standardized[2]
https://wiki.mozilla.org/Modules/Firefox_Technical_Leadership