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 --- .../tests/arguments/strict-maybe-assign-outer.js | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js (limited to 'js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js') diff --git a/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js b/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js new file mode 100644 index 0000000000..63f9f69248 --- /dev/null +++ b/js/src/jit-test/tests/arguments/strict-maybe-assign-outer.js @@ -0,0 +1,26 @@ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ +load(libdir + 'array-compare.js'); + +var obj = {}; + +function strictMaybeAssignOuterParam(p) +{ + "use strict"; + function inner() { p = 17; } + return arguments; +} + +var a1, a2, a3; +for (var i = 0; i < 5; i++) +{ + a1 = strictMaybeAssignOuterParam(); + a2 = strictMaybeAssignOuterParam(17); + a3 = strictMaybeAssignOuterParam(obj); +} + +assertEq(arraysEqual(a1, []), true); +assertEq(arraysEqual(a2, [17]), true); +assertEq(arraysEqual(a3, [obj]), true); -- cgit v1.2.3