summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/debug
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /js/src/jit-test/tests/debug
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz
firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/debug')
-rw-r--r--js/src/jit-test/tests/debug/Debugger-findScripts-26.js1
-rw-r--r--js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js2
-rw-r--r--js/src/jit-test/tests/debug/Memory-takeCensus-06.js26
-rw-r--r--js/src/jit-test/tests/debug/Object-getPromiseReactions-07.js14
-rw-r--r--js/src/jit-test/tests/debug/Object-isSameNativeWithJitInfo.js32
-rw-r--r--js/src/jit-test/tests/debug/breakpoint-oom-01.js2
-rw-r--r--js/src/jit-test/tests/debug/bug-1238610.js2
-rw-r--r--js/src/jit-test/tests/debug/bug-1248162.js2
-rw-r--r--js/src/jit-test/tests/debug/bug-1260725.js2
-rw-r--r--js/src/jit-test/tests/debug/bug-1565275.js2
-rw-r--r--js/src/jit-test/tests/debug/bug-1576862-2.js1
-rw-r--r--js/src/jit-test/tests/debug/bug-1584195.js1
-rw-r--r--js/src/jit-test/tests/debug/bug1216261.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1219905.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1240546.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1240803.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1242111.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1245862.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1251919.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1254123.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1254190.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1254578.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1264961.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1272908.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1370905.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1404710.js1
-rw-r--r--js/src/jit-test/tests/debug/bug1434391.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1647309.js2
-rw-r--r--js/src/jit-test/tests/debug/bug1878511.js1
-rw-r--r--js/src/jit-test/tests/debug/job-queue-04.js1
-rw-r--r--js/src/jit-test/tests/debug/wasm-14.js2
-rw-r--r--js/src/jit-test/tests/debug/wasm-15.js2
32 files changed, 87 insertions, 37 deletions
diff --git a/js/src/jit-test/tests/debug/Debugger-findScripts-26.js b/js/src/jit-test/tests/debug/Debugger-findScripts-26.js
index 1c1510aa4f..57709782ab 100644
--- a/js/src/jit-test/tests/debug/Debugger-findScripts-26.js
+++ b/js/src/jit-test/tests/debug/Debugger-findScripts-26.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
var g = newGlobal({newCompartment: true});
var dbg = new Debugger();
var gw = dbg.addDebuggee(g);
diff --git a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js
index 6ab17714e6..781e300f93 100644
--- a/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js
+++ b/js/src/jit-test/tests/debug/Memory-drainAllocationsLog-18.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('gczeal' in this)
-
// Test drainAllocationsLog() entries' inNursery flag.
gczeal(0);
diff --git a/js/src/jit-test/tests/debug/Memory-takeCensus-06.js b/js/src/jit-test/tests/debug/Memory-takeCensus-06.js
index 02f8de30be..9a49140638 100644
--- a/js/src/jit-test/tests/debug/Memory-takeCensus-06.js
+++ b/js/src/jit-test/tests/debug/Memory-takeCensus-06.js
@@ -106,3 +106,29 @@ Pattern({
other: { by: 'count', label: 'other' }
}
}));
+
+try {
+ const breakdown = { by: "objectClass" };
+ breakdown.then = breakdown;
+ dbg.memory.takeCensus({ breakdown });
+ assertEq(true, false, "should not reach here");
+} catch (e) {
+ assertEq(e.message, "takeCensus breakdown 'by' value nested within itself: \"objectClass\"");
+}
+
+try {
+ const breakdown = { by: "objectClass", then: { by: "objectClass" } };
+ dbg.memory.takeCensus({ breakdown });
+ assertEq(true, false, "should not reach here");
+} catch (e) {
+ assertEq(e.message, "takeCensus breakdown 'by' value nested within itself: \"objectClass\"");
+}
+
+try {
+ const breakdown = { by: "coarseType", scripts: { by: "filename" } };
+ breakdown.scripts.noFilename = breakdown;
+ dbg.memory.takeCensus({ breakdown });
+ assertEq(true, false, "should not reach here");
+} catch (e) {
+ assertEq(e.message, "takeCensus breakdown 'by' value nested within itself: \"coarseType\"");
+}
diff --git a/js/src/jit-test/tests/debug/Object-getPromiseReactions-07.js b/js/src/jit-test/tests/debug/Object-getPromiseReactions-07.js
new file mode 100644
index 0000000000..a79b2dc2ef
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Object-getPromiseReactions-07.js
@@ -0,0 +1,14 @@
+async function f(arg) {
+ await arg;
+
+ const g = newGlobal({ sameZoneAs: {} });
+ const dbg = g.Debugger({});
+ const promise = dbg.getNewestFrame().asyncPromise;
+ dbg.removeAllDebuggees();
+
+ // getPromiseReactions should return an empty array after removing debuggee.
+ assertEq(promise.getPromiseReactions().length, 0);
+}
+
+const p = f();
+f(p);
diff --git a/js/src/jit-test/tests/debug/Object-isSameNativeWithJitInfo.js b/js/src/jit-test/tests/debug/Object-isSameNativeWithJitInfo.js
new file mode 100644
index 0000000000..648847ae49
--- /dev/null
+++ b/js/src/jit-test/tests/debug/Object-isSameNativeWithJitInfo.js
@@ -0,0 +1,32 @@
+var g = newGlobal({newCompartment: true});
+var dbg = Debugger(g);
+var gdbg = dbg.addDebuggee(g);
+
+assertEq(gdbg.getProperty("print").return.isSameNativeWithJitInfo(print), true);
+assertEq(gdbg.getProperty("print").return.isSameNativeWithJitInfo(newGlobal), false);
+
+// FakeDOMObject's accessor shares the single native functions, with
+// different JSJitInfo for each.
+
+gdbg.executeInGlobal(`
+var fun1 = Object.getOwnPropertyDescriptor(FakeDOMObject.prototype, "x").get;
+var fun2 = Object.getOwnPropertyDescriptor(FakeDOMObject.prototype, "slot").get;
+`);
+
+var g_fun1 = gdbg.executeInGlobal("fun1").return;
+var g_fun2 = gdbg.executeInGlobal("fun2").return;
+
+var fun1 = Object.getOwnPropertyDescriptor(FakeDOMObject.prototype, "x").get;
+var fun2 = Object.getOwnPropertyDescriptor(FakeDOMObject.prototype, "slot").get;
+
+// isSameNative doesn't distinguish between fun1 and fun2.
+assertEq(g_fun1.isSameNative(fun1), true);
+assertEq(g_fun1.isSameNative(fun2), true);
+assertEq(g_fun2.isSameNative(fun1), true);
+assertEq(g_fun2.isSameNative(fun2), true);
+
+// isSameNativeWithJitInfo can distinguish between fun1 and fun2.
+assertEq(g_fun1.isSameNativeWithJitInfo(fun1), true);
+assertEq(g_fun1.isSameNativeWithJitInfo(fun2), false);
+assertEq(g_fun2.isSameNativeWithJitInfo(fun1), false);
+assertEq(g_fun2.isSameNativeWithJitInfo(fun2), true);
diff --git a/js/src/jit-test/tests/debug/breakpoint-oom-01.js b/js/src/jit-test/tests/debug/breakpoint-oom-01.js
index 4fd709ccd0..cbbbd7ffda 100644
--- a/js/src/jit-test/tests/debug/breakpoint-oom-01.js
+++ b/js/src/jit-test/tests/debug/breakpoint-oom-01.js
@@ -1,4 +1,4 @@
-// |jit-test| skip-if: !('oomTest' in this)
+// |jit-test| skip-if: !hasFunction.oomTest
// Test for OOM hitting a breakpoint in a generator.
//
diff --git a/js/src/jit-test/tests/debug/bug-1238610.js b/js/src/jit-test/tests/debug/bug-1238610.js
index 91562443bd..79fe5b3c2c 100644
--- a/js/src/jit-test/tests/debug/bug-1238610.js
+++ b/js/src/jit-test/tests/debug/bug-1238610.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this) || helperThreadCount() === 0
+// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations || helperThreadCount() === 0
lfcode = new Array();
dbg = Debugger();
diff --git a/js/src/jit-test/tests/debug/bug-1248162.js b/js/src/jit-test/tests/debug/bug-1248162.js
index 825b3376e4..6deadfdc07 100644
--- a/js/src/jit-test/tests/debug/bug-1248162.js
+++ b/js/src/jit-test/tests/debug/bug-1248162.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomTest' in this)
+// |jit-test| allow-oom
// Adapted from randomly chosen test: js/src/jit-test/tests/debug/Debugger-onNewGlobalObject-01.js
for (var i = 0; i < 9; ++i) {
diff --git a/js/src/jit-test/tests/debug/bug-1260725.js b/js/src/jit-test/tests/debug/bug-1260725.js
index ce1c263f6a..7f8895e589 100644
--- a/js/src/jit-test/tests/debug/bug-1260725.js
+++ b/js/src/jit-test/tests/debug/bug-1260725.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
var dbg = new Debugger;
dbg.onNewGlobalObject = function(global) {
dbg.memory.takeCensus({});
diff --git a/js/src/jit-test/tests/debug/bug-1565275.js b/js/src/jit-test/tests/debug/bug-1565275.js
index 242bce3a85..9e600162a4 100644
--- a/js/src/jit-test/tests/debug/bug-1565275.js
+++ b/js/src/jit-test/tests/debug/bug-1565275.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
Object.defineProperty(this, "fuzzutils", {
value: {
evaluate: function() {},
diff --git a/js/src/jit-test/tests/debug/bug-1576862-2.js b/js/src/jit-test/tests/debug/bug-1576862-2.js
index 6f7c31e98a..e1922f4a19 100644
--- a/js/src/jit-test/tests/debug/bug-1576862-2.js
+++ b/js/src/jit-test/tests/debug/bug-1576862-2.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('stackTest' in this)
// Failure to rewrap an exception in Completion::fromJSResult should be propagated.
var dbgGlobal = newGlobal({ newCompartment: true });
diff --git a/js/src/jit-test/tests/debug/bug-1584195.js b/js/src/jit-test/tests/debug/bug-1584195.js
index 93aca7291d..dd74597b1b 100644
--- a/js/src/jit-test/tests/debug/bug-1584195.js
+++ b/js/src/jit-test/tests/debug/bug-1584195.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('gczeal' in this)
// Bug 1584195: Debugger.Frame finalizer should't try to apply
// IsAboutToBeFinalized to cells of other alloc kinds, whose arenas may have
// been turned over to fresh allocations.
diff --git a/js/src/jit-test/tests/debug/bug1216261.js b/js/src/jit-test/tests/debug/bug1216261.js
index 0d98327256..6051d69c95 100644
--- a/js/src/jit-test/tests/debug/bug1216261.js
+++ b/js/src/jit-test/tests/debug/bug1216261.js
@@ -1,4 +1,4 @@
-// |jit-test| exitstatus: 3; skip-if: !('oomAfterAllocations' in this)
+// |jit-test| exitstatus: 3
var g = newGlobal();
var dbg = new Debugger(g);
diff --git a/js/src/jit-test/tests/debug/bug1219905.js b/js/src/jit-test/tests/debug/bug1219905.js
index 5ed51a2423..5e5595a4e7 100644
--- a/js/src/jit-test/tests/debug/bug1219905.js
+++ b/js/src/jit-test/tests/debug/bug1219905.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomTest' in this)
+// |jit-test| allow-oom
// We need allow-oom here because the debugger reports an uncaught exception if
// it hits OOM calling the exception unwind hook. This causes the shell to exit
diff --git a/js/src/jit-test/tests/debug/bug1240546.js b/js/src/jit-test/tests/debug/bug1240546.js
index 6d548d8b92..797af37988 100644
--- a/js/src/jit-test/tests/debug/bug1240546.js
+++ b/js/src/jit-test/tests/debug/bug1240546.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
+// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
var g = newGlobal();
g.debuggeeGlobal = this;
diff --git a/js/src/jit-test/tests/debug/bug1240803.js b/js/src/jit-test/tests/debug/bug1240803.js
index ab1e0fb641..74eb34ed61 100644
--- a/js/src/jit-test/tests/debug/bug1240803.js
+++ b/js/src/jit-test/tests/debug/bug1240803.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
+// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
(function() {
g = newGlobal({newCompartment: true})
diff --git a/js/src/jit-test/tests/debug/bug1242111.js b/js/src/jit-test/tests/debug/bug1242111.js
index dae0efcdab..ebfc2eec70 100644
--- a/js/src/jit-test/tests/debug/bug1242111.js
+++ b/js/src/jit-test/tests/debug/bug1242111.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
+// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
var g = newGlobal();
g.debuggeeGlobal = [];
diff --git a/js/src/jit-test/tests/debug/bug1245862.js b/js/src/jit-test/tests/debug/bug1245862.js
index 274903bc40..83793a7306 100644
--- a/js/src/jit-test/tests/debug/bug1245862.js
+++ b/js/src/jit-test/tests/debug/bug1245862.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomAfterAllocations' in this)
+// |jit-test| allow-oom; skip-if: !hasFunction.oomAfterAllocations
var g = newGlobal({newCompartment: true});
var dbg = new Debugger;
diff --git a/js/src/jit-test/tests/debug/bug1251919.js b/js/src/jit-test/tests/debug/bug1251919.js
index 79fd05f890..9e5ccac82f 100644
--- a/js/src/jit-test/tests/debug/bug1251919.js
+++ b/js/src/jit-test/tests/debug/bug1251919.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
// jsfunfuzz-generated
fullcompartmentchecks(true);
// Adapted from randomly chosen test: js/src/jit-test/tests/debug/bug-1248162.js
diff --git a/js/src/jit-test/tests/debug/bug1254123.js b/js/src/jit-test/tests/debug/bug1254123.js
index 72f36ef3ec..c96753b305 100644
--- a/js/src/jit-test/tests/debug/bug1254123.js
+++ b/js/src/jit-test/tests/debug/bug1254123.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
evaluate(`
function ERROR(msg) {
throw new Error("boom");
diff --git a/js/src/jit-test/tests/debug/bug1254190.js b/js/src/jit-test/tests/debug/bug1254190.js
index 3d3572b469..74a4799c39 100644
--- a/js/src/jit-test/tests/debug/bug1254190.js
+++ b/js/src/jit-test/tests/debug/bug1254190.js
@@ -1,4 +1,4 @@
-// |jit-test| slow; skip-if: !('oomTest' in this); allow-oom
+// |jit-test| slow; allow-oom
var g = newGlobal({newCompartment: true});
var dbg = new Debugger(g);
diff --git a/js/src/jit-test/tests/debug/bug1254578.js b/js/src/jit-test/tests/debug/bug1254578.js
index f36bcef601..9592adb67a 100644
--- a/js/src/jit-test/tests/debug/bug1254578.js
+++ b/js/src/jit-test/tests/debug/bug1254578.js
@@ -1,5 +1,3 @@
-// |jit-test| slow; skip-if: !('oomTest' in this)
-
var g = newGlobal({newCompartment: true});
g.debuggeeGlobal = this;
g.eval("(" + function() {
diff --git a/js/src/jit-test/tests/debug/bug1264961.js b/js/src/jit-test/tests/debug/bug1264961.js
index c43a29504d..2047768aeb 100644
--- a/js/src/jit-test/tests/debug/bug1264961.js
+++ b/js/src/jit-test/tests/debug/bug1264961.js
@@ -1,4 +1,4 @@
-// |jit-test| slow; skip-if: !('oomTest' in this)
+// |jit-test| slow
loadFile(`
var o = {}
diff --git a/js/src/jit-test/tests/debug/bug1272908.js b/js/src/jit-test/tests/debug/bug1272908.js
index b1e1c5aeaf..397de9a8eb 100644
--- a/js/src/jit-test/tests/debug/bug1272908.js
+++ b/js/src/jit-test/tests/debug/bug1272908.js
@@ -1,4 +1,4 @@
-// |jit-test| slow; skip-if: !('oomTest' in this)
+// |jit-test| slow
// Adapted from randomly chosen test: js/src/jit-test/tests/modules/bug-1233915.js
g = newGlobal({newCompartment: true});
diff --git a/js/src/jit-test/tests/debug/bug1370905.js b/js/src/jit-test/tests/debug/bug1370905.js
index 8f8143132e..7237e55420 100644
--- a/js/src/jit-test/tests/debug/bug1370905.js
+++ b/js/src/jit-test/tests/debug/bug1370905.js
@@ -1,4 +1,4 @@
-// |jit-test| allow-oom; skip-if: !('oomTest' in this)
+// |jit-test| allow-oom
function x() {
var global = newGlobal({sameZoneAs: this});
diff --git a/js/src/jit-test/tests/debug/bug1404710.js b/js/src/jit-test/tests/debug/bug1404710.js
index 78a8bbb5b8..69aa078333 100644
--- a/js/src/jit-test/tests/debug/bug1404710.js
+++ b/js/src/jit-test/tests/debug/bug1404710.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('stackTest' in this)
stackTest(new Function(`
var g = newGlobal();
var dbg = new Debugger(g);
diff --git a/js/src/jit-test/tests/debug/bug1434391.js b/js/src/jit-test/tests/debug/bug1434391.js
index 86efe7970b..d3231b6e15 100644
--- a/js/src/jit-test/tests/debug/bug1434391.js
+++ b/js/src/jit-test/tests/debug/bug1434391.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
var g = newGlobal({newCompartment: true});
var dbg = new Debugger();
var gw = dbg.addDebuggee(g);
diff --git a/js/src/jit-test/tests/debug/bug1647309.js b/js/src/jit-test/tests/debug/bug1647309.js
index e4ffcfc349..520e505b5c 100644
--- a/js/src/jit-test/tests/debug/bug1647309.js
+++ b/js/src/jit-test/tests/debug/bug1647309.js
@@ -1,5 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
-
const g = newGlobal({ newCompartment: true });
const dbg = new Debugger(g);
diff --git a/js/src/jit-test/tests/debug/bug1878511.js b/js/src/jit-test/tests/debug/bug1878511.js
index f9143b9961..a6a550c4b7 100644
--- a/js/src/jit-test/tests/debug/bug1878511.js
+++ b/js/src/jit-test/tests/debug/bug1878511.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
var c = 0;
var dbg = new Debugger();
oomTest(function () {
diff --git a/js/src/jit-test/tests/debug/job-queue-04.js b/js/src/jit-test/tests/debug/job-queue-04.js
index 76cf241e8d..040f5874c0 100644
--- a/js/src/jit-test/tests/debug/job-queue-04.js
+++ b/js/src/jit-test/tests/debug/job-queue-04.js
@@ -1,4 +1,3 @@
-// |jit-test| skip-if: !('oomTest' in this)
// Bug 1527862: Don't assert that the Debugger drained its job queue unless we
// actually saved the debuggee's queue.
diff --git a/js/src/jit-test/tests/debug/wasm-14.js b/js/src/jit-test/tests/debug/wasm-14.js
index 023c16dca4..b47b540d72 100644
--- a/js/src/jit-test/tests/debug/wasm-14.js
+++ b/js/src/jit-test/tests/debug/wasm-14.js
@@ -1,4 +1,4 @@
-// |jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-function-references --wasm-gc; skip-if: !wasmDebuggingEnabled() || !wasmGcEnabled(); skip-if: true
+// |jit-test| test-also=--wasm-compiler=optimizing; test-also=--setpref=wasm_gc=true; skip-if: !wasmDebuggingEnabled() || !wasmGcEnabled(); skip-if: true
// An extension of wasm-10.js, testing that wasm GC objects are inspectable in locals.
// As of bug 1825098, this test is disabled. (skip-if: true)
diff --git a/js/src/jit-test/tests/debug/wasm-15.js b/js/src/jit-test/tests/debug/wasm-15.js
index 90b1fbea3b..c2af3bdc17 100644
--- a/js/src/jit-test/tests/debug/wasm-15.js
+++ b/js/src/jit-test/tests/debug/wasm-15.js
@@ -63,7 +63,7 @@ wasmRunWithDebugger(
);
// Checking if enter/leave frame at return_call_ref.
-wasmFunctionReferencesEnabled() && wasmRunWithDebugger(
+wasmGcEnabled() && wasmRunWithDebugger(
'(module (type $t (func)) (elem declare func 0) (func) (func (return_call_ref $t (ref.func 0))) (func (call 1)) (export "test" (func 2)))',
undefined,
function ({dbg}) {