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 --- .../tests/debug/execution-observability-06.js | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 js/src/jit-test/tests/debug/execution-observability-06.js (limited to 'js/src/jit-test/tests/debug/execution-observability-06.js') diff --git a/js/src/jit-test/tests/debug/execution-observability-06.js b/js/src/jit-test/tests/debug/execution-observability-06.js new file mode 100644 index 0000000000..fbc3913002 --- /dev/null +++ b/js/src/jit-test/tests/debug/execution-observability-06.js @@ -0,0 +1,24 @@ +// Test that OSR respect debuggeeness. + +var g = newGlobal({newCompartment: true}); +var dbg = new Debugger(g); + +g.eval("" + function f(c) { + if (c == 0) + return; + if (c == 2) + debugger; + f(c-1); + acc = 0; + for (var i = 0; i < 100; i++) + acc += i; +}); + +var log = ""; +dbg.onDebuggerStatement = function (frame) { + frame.onPop = function f() { log += "p"; } +}; + +g.eval("f(2)"); + +assertEq(log, "p"); -- cgit v1.2.3