You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add new proxying modes foo__proxy: 'abort' and foo__proxy: 'abort_debug', which will add compile time checks to verify that given JS function is not called in pthreads or Wasm Workers.
prefix+=`\nassert(!ENVIRONMENT_IS_WASM_WORKER, "Attempted to call proxied function '${mangled}' in a Wasm Worker, but in Wasm Worker enabled builds, proxied function architecture is not available!");`;
prefix=`assert(!${insideWorker}, "Attempted to call function '${mangled}' inside a pthread/Wasm Worker, but this function has been declared to only be callable from the main browser thread");`;
349
+
}
350
+
351
+
return`function(${args}) {
352
+
${prefix}
340
353
${body}
341
354
}\n`;
342
-
});
343
-
}elseif(WASM_WORKERS&&ASSERTIONS){
344
-
// In ASSERTIONS builds add runtime checks that proxied functions are not attempted to be called in Wasm Workers
345
-
// (since there is no automatic proxying architecture available)
346
-
snippet=modifyJSFunction(
347
-
snippet,
348
-
(args,body)=>`
349
-
function(${args}) {
350
-
assert(!ENVIRONMENT_IS_WASM_WORKER, "Attempted to call proxied function '${mangled}' in a Wasm Worker, but in Wasm Worker enabled builds, proxied function architecture is not available!");
0 commit comments