Skip to content

Commit 119421b

Browse files
authored
[dylink] Refactor loadWebAssemblyModule to avoid retaining wasm bytes. NFC (#28021)
Split `instantiateModule`, `addEmAsm`, and `addEmJs` out of `loadWebAssemblyModule` and replace the async IIFE with `.then()` so that long-lived import stub closures do not capture and retain the side module's `binary` buffer in their shared closure context. This also ends up saving a few bytes of code size which is nice. See: #28002
1 parent 429128c commit 119421b

3 files changed

Lines changed: 271 additions & 275 deletions

File tree

0 commit comments

Comments
 (0)