mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
1. implement Object.preventExtensions, Object.getPrototypeOf, Object.prototype.valueOf
2. Fix bug in Object::set 3. Fix bug in Object::defineOwnProperty 4. implement function Number correctly 5. set prototype of String, Number object correctly Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
43103b8542
commit
3d16ed27df
6 changed files with 62 additions and 17 deletions
|
|
@ -565,6 +565,8 @@ void GlobalObject::installString(ExecutionState& state)
|
|||
m_stringPrototype = m_objectPrototype;
|
||||
m_stringPrototype = new StringObject(state, String::emptyString);
|
||||
m_stringPrototype->setPrototype(state, m_objectPrototype);
|
||||
m_string->setFunctionPrototype(state, m_stringPrototype);
|
||||
m_stringPrototype->defineOwnProperty(state, ObjectPropertyName(state.context()->staticStrings().constructor), ObjectPropertyDescriptor(m_string));
|
||||
|
||||
m_stringPrototype->defineOwnPropertyThrowsException(state, ObjectPropertyName(state.context()->staticStrings().toString),
|
||||
ObjectPropertyDescriptor(new FunctionObject(state, NativeFunctionInfo(state.context()->staticStrings().toString, builtinStringToString, 0, nullptr, NativeFunctionInfo::Strict)), (ObjectPropertyDescriptor::PresentAttribute)(ObjectPropertyDescriptor::WritablePresent | ObjectPropertyDescriptor::ConfigurablePresent)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue