зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1018621 - Fix strict mode arguments observability in Ion. (r=nbp)
This commit is contained in:
Родитель
7bfe593f9a
Коммит
7cd6d6d51c
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче