Check stack overflow in ProxyObject::getPrototype, ProxyObject::getPrototypeObject

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2026-05-26 21:18:16 +09:00 committed by MuHong Byun
commit 779f6bedf5
2 changed files with 5 additions and 1 deletions

View file

@ -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