Don't store argc, argv on FunctionEnvironmentRecord. (#358)

Save argc, argv on ExecutionState is enough.
and if function call is end, argv member on env points wrong place.

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
Patrick Kim 2019-08-09 13:52:17 +09:00 committed by Hyukwoo Park
commit 3bc6cb5cca
13 changed files with 88 additions and 89 deletions

View file

@ -135,7 +135,7 @@ Value NativeFunctionObject::processNativeFunctionCall(ExecutionState& state, con
}
Value receiver = receiverSrc;
ExecutionState newState(ctx, &state, nullptr, this, isStrict);
ExecutionState newState(ctx, &state, nullptr, this, argc, argv, isStrict);
if (!isConstruct) {
// prepare receiver