From 36d22d82aa202bb199967e9512281e9a53db42c9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 21:33:14 +0200 Subject: Adding upstream version 115.7.0esr. Signed-off-by: Daniel Baumann --- js/src/jit-test/tests/jaeger/testCallElemAfterGC.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 js/src/jit-test/tests/jaeger/testCallElemAfterGC.js (limited to 'js/src/jit-test/tests/jaeger/testCallElemAfterGC.js') diff --git a/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js new file mode 100644 index 0000000000..369aa2c6fb --- /dev/null +++ b/js/src/jit-test/tests/jaeger/testCallElemAfterGC.js @@ -0,0 +1,20 @@ +// vim: set ts=8 sts=4 et sw=4 tw=99: + +function A() { + this.x = 12; + this.y = function () { return this.x; }; + this[1] = function () { return this.x; }; +} + +function f(obj, key){ + assertEq(obj[key](), 12); +} + +a = new A(); +f(a, "y"); +f(a, "y"); +f(a, 1); +gc(); +f(a, "y"); +f(a, "y"); + -- cgit v1.2.3