Skip to content

Commit 9b456fd

Browse files
authored
Propagate exceptions for bootstrapper NativeFunction (#6)
Add `exceptions: "propagate"` (default is `steal`) to NativeFunction call for bootstrapper to resolve `new Harmony` call exceptions on native call
1 parent d856191 commit 9b456fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ rpc.exports = {
33
const bootstrapperModule = Module.load(bootstrapper);
44

55
const functionPointer = bootstrapperModule.getExportByName("bootstrapper_load_assembly");
6-
const bootstrapper_load_assembly = new NativeFunction(functionPointer, "uint32", ["pointer", "pointer", "pointer", "pointer"]);
6+
const bootstrapper_load_assembly = new NativeFunction(functionPointer, "uint32", ["pointer", "pointer", "pointer", "pointer"], { exceptions: "propagate" });
77

88
const allocUtfString = Process.platform === "windows" ? Memory.allocUtf16String : Memory.allocUtf8String;
99
return bootstrapper_load_assembly(

0 commit comments

Comments
 (0)