From 0897db613f33801f0db864abe68488db471ebb06 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 31 Oct 2024 15:07:51 -0700 Subject: [PATCH] Fix for `none` proxying mode It looks like this mode was broken from the moment it as added back in PR #20110. However it went unnoticed since it was only being used with a single function: `__syscall_fadvise64`. Split out from #22820. --- src/jsifier.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsifier.mjs b/src/jsifier.mjs index 09b41f08dff52..233928161ccd3 100644 --- a/src/jsifier.mjs +++ b/src/jsifier.mjs @@ -326,7 +326,7 @@ function(${args}) { if (proxyingMode !== 'sync' && proxyingMode !== 'async' && proxyingMode !== 'none') { throw new Error(`Invalid proxyingMode ${symbol}__proxy: '${proxyingMode}' specified!`); } - if (SHARED_MEMORY) { + if (SHARED_MEMORY && proxyingMode != 'none') { const sync = proxyingMode === 'sync'; if (PTHREADS) { snippet = modifyJSFunction(snippet, (args, body, async_, oneliner) => {