STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(StringObject);
-const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0, CREATE_METHOD_TABLE(StringObject) };
+const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, CREATE_METHOD_TABLE(StringObject) };
StringObject::StringObject(VM& vm, Structure* structure)
: JSWrapperObject(vm, structure)
}
if (descriptor.configurablePresent() && descriptor.configurable()) {
if (throwException)
- exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Attempting to configurable attribute of unconfigurable property.")));
+ exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Attempting to change configurable attribute of unconfigurable property.")));
return false;
}
if (descriptor.enumerablePresent() && descriptor.enumerable()) {
StringObject* thisObject = jsCast<StringObject*>(cell);
if (propertyName == exec->propertyNames().length)
return false;
- unsigned i = propertyName.asIndex();
- if (thisObject->internalValue()->canGetIndex(i)) {
- ASSERT(i != PropertyName::NotAnIndex); // No need for an explicit check, the above test would always fail!
+ Optional<uint32_t> index = parseIndex(propertyName);
+ if (index && thisObject->internalValue()->canGetIndex(index.value())) {
return false;
}
return JSObject::deleteProperty(thisObject, exec, propertyName);
int size = thisObject->internalValue()->length();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier::from(exec, i));
- if (mode == IncludeDontEnumProperties)
+ if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().length);
return JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}