mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Implement Proxy object internal methods (#39)
* updated proxy methods GetPrototypeOf SetPrototypeOf IsExtensible PreventExtensions GetOwnProperty DefineOwnProperty HasProperty Get Set Delete ProxyCreate * TODO Enumerate and OwnPropertyKeys Call and Construct Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
7d320870d7
commit
40d4fa40c6
21 changed files with 1005 additions and 301 deletions
|
|
@ -363,7 +363,7 @@ bool ArrayObject::setFastModeValue(ExecutionState& state, const ObjectPropertyNa
|
|||
}
|
||||
|
||||
if (UNLIKELY(len <= idx)) {
|
||||
if (UNLIKELY(!isExtensible())) {
|
||||
if (UNLIKELY(!isExtensible(state))) {
|
||||
return false;
|
||||
}
|
||||
if (UNLIKELY(!setArrayLength(state, idx + 1)) || UNLIKELY(!isFastModeArray())) {
|
||||
|
|
@ -401,7 +401,7 @@ bool ArrayObject::setIndexedProperty(ExecutionState& state, const Value& propert
|
|||
if (LIKELY(idx != Value::InvalidArrayIndexValue)) {
|
||||
uint32_t len = getArrayLength(state);
|
||||
if (UNLIKELY(len <= idx)) {
|
||||
if (UNLIKELY(!isExtensible())) {
|
||||
if (UNLIKELY(!isExtensible(state))) {
|
||||
return false;
|
||||
}
|
||||
if (UNLIKELY(!setArrayLength(state, idx + 1)) || UNLIKELY(!isFastModeArray())) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue