mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Revise function call & Realm
* Revise Object::getPrototypeFromConstructor. we should get prototype from context of consturctor * We should pass Optional<Object*> instead of Value with newTarget. * Give correct prototype value for function prototypes and functions * Implement %ThrowTypeError% correctly Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
3f63741714
commit
1bd124fc1b
56 changed files with 642 additions and 646 deletions
|
|
@ -94,7 +94,7 @@ bool NativeFunctionObject::isConstructor() const
|
|||
}
|
||||
|
||||
template <bool isConstruct>
|
||||
Value NativeFunctionObject::processNativeFunctionCall(ExecutionState& state, const Value& receiverSrc, const size_t argc, Value* argv, Object* newTarget)
|
||||
Value NativeFunctionObject::processNativeFunctionCall(ExecutionState& state, const Value& receiverSrc, const size_t argc, Value* argv, Optional<Object*> newTarget)
|
||||
{
|
||||
volatile int sp;
|
||||
size_t currentStackBase = (size_t)&sp;
|
||||
|
|
@ -145,7 +145,7 @@ Value NativeFunctionObject::processNativeFunctionCall(ExecutionState& state, con
|
|||
return result;
|
||||
} else {
|
||||
ASSERT(!newTarget);
|
||||
return code->m_fn(newState, receiver, argc, argv, Value());
|
||||
return code->m_fn(newState, receiver, argc, argv, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue