diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 03:01:59 +0000 |
commit | 85310221f0512bf1aeefc49ead8a1e11bda55990 (patch) | |
tree | 70a3efbfee6c7cbeb626185b35166d2c376b4bb8 /js/src/jit-test/tests | |
parent | Adding upstream version 126.0. (diff) | |
download | firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.tar.xz firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.zip |
Adding upstream version 126.0.1.upstream/126.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/jit-test/tests')
-rw-r--r-- | js/src/jit-test/tests/arrays/bug1897150-1.js | 9 | ||||
-rw-r--r-- | js/src/jit-test/tests/arrays/bug1897150-2.js | 9 |
2 files changed, 18 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); diff --git a/js/src/jit-test/tests/arrays/bug1897150-2.js b/js/src/jit-test/tests/arrays/bug1897150-2.js new file mode 100644 index 0000000000..53f78a8a45 --- /dev/null +++ b/js/src/jit-test/tests/arrays/bug1897150-2.js @@ -0,0 +1,9 @@ +var typedArr = Uint8Array.from([1,2,3,4]) +var global = 1; + +var comparator = function(a, b) { + assertEq(this.global, 1); + return b - a; +} + +typedArr.sort(comparator); |