Fix Iterator and WeakMap prototype objects to be an ordinary object

* remove ArrayIteratorPrototypeObject
* fix ArrayIteratorPrototype.next to throw a TypeError for detached buffer

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2020-03-25 16:11:21 +09:00 committed by Boram Bae
commit 38750ec549
14 changed files with 44 additions and 69 deletions

View file

@ -129,12 +129,7 @@ ObjectHasPropertyResult StringObject::hasIndexedProperty(ExecutionState& state,
}
StringIteratorObject::StringIteratorObject(ExecutionState& state, String* s)
: StringIteratorObject(state, state.context()->globalObject()->stringIteratorPrototype(), s)
{
}
StringIteratorObject::StringIteratorObject(ExecutionState& state, Object* proto, String* s)
: IteratorObject(state, proto)
: IteratorObject(state, state.context()->globalObject()->stringIteratorPrototype())
, m_string(s)
, m_iteratorNextIndex(0)
{