mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Check stack overflow in ProxyObject::getPrototype, ProxyObject::getPrototypeObject
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
d581b27af6
commit
779f6bedf5
2 changed files with 5 additions and 1 deletions
|
|
@ -738,6 +738,8 @@ bool ProxyObject::setPrototype(ExecutionState& state, const Value& value)
|
|||
|
||||
Object* ProxyObject::getPrototypeObject(ExecutionState& state)
|
||||
{
|
||||
CHECK_STACK_OVERFLOW(state);
|
||||
|
||||
if (!this->target()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -753,6 +755,8 @@ Object* ProxyObject::getPrototypeObject(ExecutionState& state)
|
|||
// https://www.ecma-international.org/ecma-262/6.0/index.html#sec-proxy-object-internal-methods-and-internal-slots-getprototypeof
|
||||
Value ProxyObject::getPrototype(ExecutionState& state)
|
||||
{
|
||||
CHECK_STACK_OVERFLOW(state);
|
||||
|
||||
auto strings = &state.context()->staticStrings();
|
||||
// 2. If handler is null, throw a TypeError exception.
|
||||
if (this->handler() == nullptr) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e978721a0ab7df89e06d2f335cc13e9c4468e4c6
|
||||
Subproject commit ab4ba466a1b2de29cf454c0ceea58b82cf01277b
|
||||
Loading…
Add table
Add a link
Reference in a new issue