summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug/Frame-onStep-async-03.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/debug/Frame-onStep-async-03.js')
-rw-r--r--js/src/jit-test/tests/debug/Frame-onStep-async-03.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/debug/Frame-onStep-async-03.js b/js/src/jit-test/tests/debug/Frame-onStep-async-03.js
new file mode 100644
index 0000000000..ecbd0ddf2c
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Frame-onStep-async-03.js
@@ -0,0 +1,18 @@
+// Bug 1501666: assertions about the script's step mode count must take
+// suspended calls into account. This should not crash.
+
+var g = newGlobal({ newCompartment: true });
+g.eval(`
+ async function f(y) {
+ await true;
+ await true;
+ };
+`);
+
+g.f();
+g.f();
+
+var dbg = Debugger(g);
+dbg.onEnterFrame = function(frame) {
+ frame.onStep = function() {}
+}