1. do not ASTScopeContext explicitly. it is used by ByteCode-genaration

2. alloc esprima::Error as Non-GC type.
 - it can be thrown. but, bdwgc can not see try-catch variable area.
3. Use own context when eval, function are invoked.
4. implement fake-Realm class for v8 vender test

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-03-24 19:03:27 +09:00
commit 5d56fd2bb4
14 changed files with 77 additions and 25 deletions

View file

@ -78,11 +78,11 @@ Value Script::execute(ExecutionState& state, bool isEvalMode, bool needNewEnv, b
return resultValue;
}
Script::ScriptSandboxExecuteResult Script::sandboxExecute(Context* ctx)
Script::ScriptSandboxExecuteResult Script::sandboxExecute(ExecutionState& state)
{
ScriptSandboxExecuteResult result;
SandBox sb(ctx);
ExecutionState stateForInit(ctx);
SandBox sb(state.context());
ExecutionState stateForInit(state.context(), &state, nullptr);
auto sandBoxResult = sb.run([&]() -> Value {
return execute(stateForInit, false, false, true);