From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/modules/eval-module-oom.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 js/src/jit-test/tests/modules/eval-module-oom.js (limited to 'js/src/jit-test/tests/modules/eval-module-oom.js') diff --git a/js/src/jit-test/tests/modules/eval-module-oom.js b/js/src/jit-test/tests/modules/eval-module-oom.js new file mode 100644 index 0000000000..5587670735 --- /dev/null +++ b/js/src/jit-test/tests/modules/eval-module-oom.js @@ -0,0 +1,23 @@ +// |jit-test| skip-if: !('oomTest' in this) + +// OOM tests for module parsing. + +const sa = +`export default 20; + export let a = 22; + export function f(x, y) { return x + y } +`; + +const sb = +`import x from "a"; + import { a as y } from "a"; + import * as ns from "a"; + ns.f(x, y); +`; + +oomTest(() => { + let a = registerModule('a', parseModule(sa)); + let b = registerModule('b', parseModule(sb)); + moduleLink(b); + assertEq(moduleEvaluate(b), 42); +}); -- cgit v1.2.3