Update Object.prototype.toString based on ES10

* isArray is updated as an internal method of Object
* legacy internalClassProperty is nowhere to be used

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2020-03-26 17:12:31 +09:00 committed by Patrick Kim
commit 32f6f6938e
11 changed files with 65 additions and 38 deletions

View file

@ -616,19 +616,6 @@ Object::OwnPropertyKeyVector ProxyObject::ownPropertyKeys(ExecutionState& state)
return OwnPropertyKeyVector(trapResult.data(), trapResult.size());
}
bool ProxyObject::isArray(ExecutionState& state) const
{
// 3.a. If handler is null, throw a TypeError exception.
if (m_handler == nullptr) {
ErrorObject::throwBuiltinError(state, ErrorObject::TypeError, state.context()->staticStrings().Proxy.string(), false, String::emptyString, "%s: Proxy handler should not be null.");
return false;
}
// 3.b Let target be the value of the [[ProxyTarget]] internal slot of argument.
// 3.c Return IsArray(target).
return m_target->isArray(state);
}
bool ProxyObject::isExtensible(ExecutionState& state)
{
auto strings = &state.context()->staticStrings();