From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/modules/dynamic-import-ion.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 js/src/jit-test/tests/modules/dynamic-import-ion.js (limited to 'js/src/jit-test/tests/modules/dynamic-import-ion.js') diff --git a/js/src/jit-test/tests/modules/dynamic-import-ion.js b/js/src/jit-test/tests/modules/dynamic-import-ion.js new file mode 100644 index 0000000000..9c8f5e0e40 --- /dev/null +++ b/js/src/jit-test/tests/modules/dynamic-import-ion.js @@ -0,0 +1,16 @@ +// Even with --ion-eager, this needs to be run twice before it executes the +// ion-compiled version. +for (let i = 0; i < 2; i++) { + let result = null; + let error = null; + let promise = import("../../modules/module1.js"); + promise.then((ns) => { + result = ns; + }).catch((e) => { + error = e; + }); + + drainJobQueue(); + assertEq(error, null); + assertEq(result.a, 1); +} -- cgit v1.2.3