From c162647020c26de1d27064b488ca11525f1bc4bf Mon Sep 17 00:00:00 2001 From: Dj <43033058+DjDeveloperr@users.noreply.github.com> Date: Sat, 1 Apr 2023 09:26:02 +0530 Subject: fix(ext/ffi): crash when same reference struct is used in two fields (#18531) fix #17482 --- test_ffi/tests/test.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test_ffi/tests/test.js') diff --git a/test_ffi/tests/test.js b/test_ffi/tests/test.js index 788faa93e..5e193e99f 100644 --- a/test_ffi/tests/test.js +++ b/test_ffi/tests/test.js @@ -78,6 +78,7 @@ const Point = ["f64", "f64"]; const Size = ["f64", "f64"]; const Rect = ["f64", "f64", "f64", "f64"]; const RectNested = [{ struct: Point }, { struct: Size }]; +const RectNestedCached = [{ struct: Size }, { struct: Size }]; const Mixed = ["u8", "f32", { struct: Rect }, "usize", { struct: ["u32", "u32"] }]; const dylib = Deno.dlopen(libPath, { @@ -264,7 +265,7 @@ const dylib = Deno.dlopen(libPath, { result: { struct: RectNested }, }, print_rect: { - parameters: [{ struct: Rect }], + parameters: [{ struct: RectNestedCached }], result: "void", }, print_rect_async: { -- cgit v1.2.3