Cleanup WASM signal handler initialization
Categories
(Core :: JavaScript: WebAssembly, task, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox118 | --- | fixed |
People
(Reporter: tcampbell, Assigned: jandem)
References
Details
Attachments
(1 file)
WASM signal handling on OSX uses a special handler thread which we'd like to lazily create. During various stencil work we accidentally started trigger this lazy initialization pretty eagerly from CompileOptions constructor.
To make this actually lazily on first WASM use, it probably makes more sense to check in link/instantiation code instead of parsing. Doing this also lets us remove these checks from CompileOptions and asm.js parsing.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 1•2 years ago
|
||
Jan, this is not high priority but you are probably the best person to untangle this in the future.
| Assignee | ||
Comment 2•2 years ago
|
||
After some of the Stencil changes, we now end up calling HasPlatformSupport from the
CompileOptions constructor when parsing any JS code (to check for asm.js availability).
This means we were installing the Wasm signal handlers for every process that executes
JS code. On Mac we need to create a separate thread for these signal handlers, so there is
some overhead that we want to avoid when we're not executing asm.js or Wasm code.
This patch moves the EnsureFullSignalHandlers call out of HasPlatformSupport.
We now call this when instantiating the asm.js or Wasm module.
This also simplifies the WASI build a little.
Comment 4•2 years ago
|
||
| bugherder | ||
Description
•