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/xdr/debug-lazy.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 js/src/jit-test/tests/xdr/debug-lazy.js (limited to 'js/src/jit-test/tests/xdr/debug-lazy.js') diff --git a/js/src/jit-test/tests/xdr/debug-lazy.js b/js/src/jit-test/tests/xdr/debug-lazy.js new file mode 100644 index 0000000000..8c0405742d --- /dev/null +++ b/js/src/jit-test/tests/xdr/debug-lazy.js @@ -0,0 +1,19 @@ +load(libdir + 'bytecode-cache.js'); + +// Ensure that if a function is encoded when non-lazy but relazifiable, then +// decoded, the resulting script is marked as being non-lazy so that when the +// debugger tries to delazify things it doesn't get all confused. We just use +// findScripts() to trigger debugger delazification; we don't really care about +// the scripts themselves. +function checkAfter(ctx) { + var dbg = new Debugger(ctx.global); + var allScripts = dbg.findScripts(); + assertEq(allScripts.length == 0, false); +} + +test = ` + function f() { return true; }; + f(); + ` +evalWithCache(test, { assertEqBytecode: true, assertEqResult: true, + checkAfter: checkAfter, newCompartment: true}); -- cgit v1.2.3