From f113bcf5ed240b2744c4b35e3ced0779b206360e Mon Sep 17 00:00:00 2001 From: Anton Mamontov Date: Thu, 12 Feb 2026 20:44:24 -0800 Subject: [PATCH] Propagate exceptions for bootstrapper NativeFunction Add `exceptions: "propagate"` (default is `steal`) to NativeFunction call for bootstrapper to resolve `new Harmony` call exceptions on native call --- src/agent.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agent.ts b/src/agent.ts index f74f430..d5a5ce3 100644 --- a/src/agent.ts +++ b/src/agent.ts @@ -3,7 +3,7 @@ rpc.exports = { const bootstrapperModule = Module.load(bootstrapper); const functionPointer = bootstrapperModule.getExportByName("bootstrapper_load_assembly"); - const bootstrapper_load_assembly = new NativeFunction(functionPointer, "uint32", ["pointer", "pointer", "pointer", "pointer"]); + const bootstrapper_load_assembly = new NativeFunction(functionPointer, "uint32", ["pointer", "pointer", "pointer", "pointer"], { exceptions: "propagate" }); const allocUtfString = Process.platform === "windows" ? Memory.allocUtf16String : Memory.allocUtf8String; return bootstrapper_load_assembly(