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:
kisbg 2019-03-04 12:25:32 +01:00 committed by yichoi
commit 02f462a481
14 changed files with 28 additions and 28 deletions

View file

@ -29,7 +29,7 @@ StringObject::StringObject(ExecutionState& state, String* value)
{
m_structure = state.context()->defaultStructureForStringObject();
m_values[ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER] = Value();
setPrototype(state, state.context()->globalObject()->stringPrototype());
Object::setPrototype(state, state.context()->globalObject()->stringPrototype());
}
void* StringObject::operator new(size_t size)
@ -105,7 +105,7 @@ StringIteratorObject::StringIteratorObject(ExecutionState& state, String* s)
, m_string(s)
, m_iteratorNextIndex(0)
{
setPrototype(state, state.context()->globalObject()->stringIteratorPrototype());
Object::setPrototype(state, state.context()->globalObject()->stringIteratorPrototype());
}
void* StringIteratorObject::operator new(size_t size)