mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1018621 - Fix strict mode arguments observability in Ion. (r=nbp)
This commit is contained in:
parent
cd2def28fb
commit
8083ab93fa
7
js/src/jit-test/tests/ion/bug1018621.js
Normal file
7
js/src/jit-test/tests/ion/bug1018621.js
Normal file
@ -0,0 +1,7 @@
|
||||
function strictSome(k) {
|
||||
"use strict";
|
||||
for (var i = 0; i < args.length; i++)
|
||||
assertEq(arguments[i], args[i], "wrong argument " + i);
|
||||
}
|
||||
args = [8, 6, 7, NaN, undefined, 0.3];
|
||||
strictSome.call(NaN, 8, 6, 7, NaN, undefined, 0.3);
|
@ -425,8 +425,11 @@ class CompileInfo
|
||||
|
||||
// Function.arguments can be used to access all arguments in non-strict
|
||||
// scripts, so we can't optimize out any arguments.
|
||||
if (!script()->strict() && firstArgSlot() <= slot && slot - firstArgSlot() < nargs())
|
||||
if ((hasArguments() || !script()->strict()) &&
|
||||
firstArgSlot() <= slot && slot - firstArgSlot() < nargs())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user