mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-29 10:02:14 +00:00
Add DerivedObject for sub classes of Object
* check index property set in DerivedObject::defineOwnProperty method only * index property check is removed for normal Object because PrototypeObject would check it instead Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
1763b6f38d
commit
8fa6031fec
76 changed files with 336 additions and 126 deletions
|
|
@ -29,7 +29,7 @@ StringObject::StringObject(ExecutionState& state, String* value)
|
|||
}
|
||||
|
||||
StringObject::StringObject(ExecutionState& state, Object* proto, String* value)
|
||||
: Object(state, proto, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1)
|
||||
: DerivedObject(state, proto, ESCARGOT_OBJECT_BUILTIN_PROPERTY_NUMBER + 1)
|
||||
, m_primitiveValue(value)
|
||||
{
|
||||
m_structure = state.context()->defaultStructureForStringObject();
|
||||
|
|
@ -80,7 +80,7 @@ bool StringObject::defineOwnProperty(ExecutionState& state, const ObjectProperty
|
|||
auto r = getOwnProperty(state, P);
|
||||
if (r.hasValue() && !r.isConfigurable())
|
||||
return false;
|
||||
return Object::defineOwnProperty(state, P, desc);
|
||||
return DerivedObject::defineOwnProperty(state, P, desc);
|
||||
}
|
||||
|
||||
bool StringObject::deleteOwnProperty(ExecutionState& state, const ObjectPropertyName& P)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue