Skip to content

Commit

Permalink
Runtime: fix eval to work with any JavaScript exception
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Mar 4, 2024
1 parent 3da57a7 commit 4e1fa99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/tests/test_poly_compare.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ let%expect_test "object comparison" =
assert (compare s1 s1 = 0);
assert (compare s1 s2 = 1);
assert (compare s2 s1 = 1)
[@@expect.uncaught_exn {| "Assert_failure lib/tests/test_poly_compare.ml:100:2" |}]
[@@expect.uncaught_exn {| (Invalid_argument "compare: abstract value") |}]

let%expect_test "poly compare" =
let l =
Expand Down
2 changes: 1 addition & 1 deletion runtime/wasm/runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,5 +378,5 @@
event.error&&caml_handle_uncaught_exception(event.error))
}
await _initialize();
})(((joo_global_object,jsoo_exports,globalThis)=>(x)=>eval(x))(globalThis,globalThis?.module?.exports||globalThis,globalThis),
})(((joo_global_object,jsoo_exports,globalThis)=>(x)=>eval("("+x+")"))(globalThis,globalThis?.module?.exports||globalThis,globalThis),
PRIMITIVES, STRINGS);

0 comments on commit 4e1fa99

Please sign in to comment.