summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/arrays/bug1897150-1.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:55 +0000
commit22e2874bf6412144ab4b51b95327306ef9609b2c (patch)
tree977413f3f953a8838b52b432554e53707cf27777 /js/src/jit-test/tests/arrays/bug1897150-1.js
parentReleasing progress-linux version 126.0-1~progress7.99u1. (diff)
downloadfirefox-22e2874bf6412144ab4b51b95327306ef9609b2c.tar.xz
firefox-22e2874bf6412144ab4b51b95327306ef9609b2c.zip
Merging upstream version 126.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests/arrays/bug1897150-1.js')
-rw-r--r--js/src/jit-test/tests/arrays/bug1897150-1.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arrays/bug1897150-1.js b/js/src/jit-test/tests/arrays/bug1897150-1.js
new file mode 100644
index 0000000000..d7a26fb41a
--- /dev/null
+++ b/js/src/jit-test/tests/arrays/bug1897150-1.js
@@ -0,0 +1,9 @@
+var arr = [1,2,3,4]
+var global = 1;
+
+var comparator = function(a, b) {
+ assertEq(this.global, 1);
+ return b - a;
+}
+
+arr.sort(comparator);