From 8ce0607ca134d9d520038fb7fc28d500dab74617 Mon Sep 17 00:00:00 2001 From: Andreas Rossberg Date: Tue, 29 Oct 2024 14:08:56 +0100 Subject: [PATCH] Handle extern refs --- interpreter/script/js.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interpreter/script/js.ml b/interpreter/script/js.ml index 30bbb796e9..47640d683e 100644 --- a/interpreter/script/js.ml +++ b/interpreter/script/js.ml @@ -436,7 +436,7 @@ let assert_return ress ts at = [ RefIsNull @@ at; Test (Value.I32 I32Op.Eqz) @@ at; BrIf (0l @@ at) @@ at ] - | RefResult (RefPat {it = HostRef n; _}) -> + | RefResult (RefPat {it = (HostRef n | Extern.ExternRef (HostRef n)); _}) -> [ Const (Value.I32 n @@ at) @@ at; Call (hostref_idx @@ at) @@ at; Call (eq_ref_idx @@ at) @@ at;