mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Reduce code smell -Remove setPrototype method in constructor/destructor. (#109)
https://sonarcloud.io/project/issues?id=pando-project_escargot&resolved=false&rules=cpp%3AS1699&severities=CRITICAL&sinceLeakPeriod=true&types=CODE_SMELL Signed-off-by: Bence Gabor Kis <kisbg@inf.u-szeged.hu>
This commit is contained in:
parent
8fbf6d05ed
commit
02f462a481
14 changed files with 28 additions and 28 deletions
|
|
@ -33,7 +33,7 @@ ArrayObject::ArrayObject(ExecutionState& state)
|
|||
{
|
||||
m_structure = state.context()->defaultStructureForArrayObject();
|
||||
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value(0);
|
||||
setPrototype(state, state.context()->globalObject()->arrayPrototype());
|
||||
Object::setPrototype(state, state.context()->globalObject()->arrayPrototype());
|
||||
|
||||
if (UNLIKELY(state.context()->vmInstance()->didSomePrototypeObjectDefineIndexedProperty())) {
|
||||
ensureObjectRareData()->m_isFastModeArrayObject = false;
|
||||
|
|
@ -415,7 +415,7 @@ ArrayIteratorObject::ArrayIteratorObject(ExecutionState& state, Object* a, Type
|
|||
, m_iteratorNextIndex(0)
|
||||
, m_type(type)
|
||||
{
|
||||
setPrototype(state, state.context()->globalObject()->arrayIteratorPrototype());
|
||||
Object::setPrototype(state, state.context()->globalObject()->arrayIteratorPrototype());
|
||||
}
|
||||
|
||||
void* ArrayIteratorObject::operator new(size_t size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue