mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Convert to non-fast-mode array when preventExtensions called (#186)
* first, convert to non-fast-mode and then, set non-extensible * preventExtensions api is also updated Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
d24d19face
commit
64ea29e82b
6 changed files with 45 additions and 8 deletions
|
|
@ -409,6 +409,14 @@ bool ArrayObject::setIndexedProperty(ExecutionState& state, const Value& propert
|
|||
return set(state, ObjectPropertyName(state, property), value, this);
|
||||
}
|
||||
|
||||
bool ArrayObject::preventExtensions(ExecutionState& state)
|
||||
{
|
||||
// first, convert to non-fast-mode.
|
||||
// then, set preventExtensions
|
||||
convertIntoNonFastMode(state);
|
||||
return Object::preventExtensions(state);
|
||||
}
|
||||
|
||||
ArrayIteratorObject::ArrayIteratorObject(ExecutionState& state, Object* a, Type type)
|
||||
: IteratorObject(state)
|
||||
, m_array(a)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue