mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Use Function's Context when throw exception
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
8d63665e28
commit
a07fe9ed1e
7 changed files with 20 additions and 8 deletions
|
|
@ -75,7 +75,9 @@ Value ScriptGeneratorFunctionObject::call(ExecutionState& state, const Value& th
|
|||
|
||||
Value ScriptGeneratorFunctionObject::construct(ExecutionState& state, const size_t argc, Value* argv, Object* newTarget)
|
||||
{
|
||||
ErrorObject::throwBuiltinError(state, ErrorObject::TypeError, "Generator cannot be invoked with 'new'");
|
||||
ExecutionState newState(m_codeBlock->context(), &state,
|
||||
static_cast<LexicalEnvironment*>(nullptr), argc, argv, m_codeBlock->asInterpretedCodeBlock()->isStrict());
|
||||
ErrorObject::throwBuiltinError(newState, ErrorObject::TypeError, "Generator cannot be invoked with 'new'");
|
||||
ASSERT_NOT_REACHED();
|
||||
return Value();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue