GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix wasi/test-return-on-exit on 32-bit systems · nodejs/node@df93cb4

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/wasi
    • test-return-on-exit.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/wasi/test-return-on-exit.js‎

Copy file name to clipboardExpand all lines: test/wasi/test-return-on-exit.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ const buffer = fs.readFileSync(modulePath);
2121
// Verify that if a WASI application throws an exception, Node rethrows it
2222
// properly.
2323
const wasi = new WASI({ returnOnExit: true });
24-
wasi.wasiImport.proc_exit = () => { throw new Error('test error'); };
24+
const patchedExit = () => { throw new Error('test error'); };
25+
wasi.wasiImport.proc_exit = patchedExit.bind(wasi.wasiImport);
2526
const importObject = { wasi_snapshot_preview1: wasi.wasiImport };
2627
const { instance } = await WebAssembly.instantiate(buffer, importObject);
2728

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.