Closed Bug 1887081 Opened 2 years ago Closed 2 years ago

Implement WebAssembly.JSTag

Categories

(Core :: JavaScript: WebAssembly, task, P3)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

The EH proposal has a WebAssembly.JSTag special tag object [1] which can be used to catch the value of any thrown JS value. To use it, wasm code needs to import a tag to be used in catch_ref, then this tag needs to be used for that catch clause.

This is not exactly a part of the proposal yet, but it's close. Implementing this should not be too hard, as I refactored the code to work exactly this way in bug 1873776 and now we have an internal JS tag object [2] that we can just expose.

[1] https://github.com/WebAssembly/exception-handling/pull/269
[2] https://searchfox.org/mozilla-central/rev/a06d5a8871b1796f2dbd588ab518eaa98507e018/js/src/wasm/WasmJS.h#485

Contains a drive-by fix to remove a ENABLE_WASM_EXNREF ifdef that
had no effect due to us not using ENABLE_WASM_EXNREF.

Assignee: nobody → rhunt
Status: NEW → ASSIGNED

There is an r+ patch which didn't land and no activity in this bug for 2 weeks.
:rhunt, could you have a look please?
If you still have some work to do, you can add an action "Plan Changes" in Phabricator.
For more information, please visit BugBot documentation.

Flags: needinfo?(ydelendik)
Flags: needinfo?(rhunt)

Backed out for causing mochitests failures in test_serviceworker_interfaces.html.

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | dom/serviceworkers/test/test_serviceworker_interfaces.html | undefined: If this is failing: DANGER, are you sure you want to expose the new interface JSTag to all webpages as a property on WebAssembly? Do not make a change to this file without a review from a DOM peer for that specific change!!! (or a JS peer for changes to ecmaGlobals)
Attachment #9394846 - Attachment description: Bug 1887081 - Expose WebAssembly.JSTag. r?yury → Bug 1887081 - Expose WebAssembly.JSTag. r=yury

The exnref is avaialble when IS_EARLY_BETA_OR_EARLIER -- JSTag shall be available too.

Depends on D206538

Flags: needinfo?(ydelendik)
Flags: needinfo?(rhunt)
Pushed by ydelendik@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a1f7a19bc729 Expose WebAssembly.JSTag. r=yury https://hg.mozilla.org/integration/autoland/rev/1c18b32f5d84 Relax test_interfaces check for JSTag. r=jandem,webidl,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: