Changeset 35027 in webkit for trunk/JavaScriptCore/kjs/StringObject.cpp
- Timestamp:
- Jul 6, 2008, 7:49:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/StringObject.cpp
r34861 r35027 28 28 const ClassInfo StringObject::info = { "String", 0, 0, 0 }; 29 29 30 StringObject::StringObject(ExecState* exec, JSObject* proto )31 : JSWrapperObject(proto)30 StringObject::StringObject(ExecState* exec, JSObject* prototype) 31 : JSWrapperObject(prototype) 32 32 { 33 setInternalValue(jsString(exec, ""));33 setInternalValue(jsString(exec, "")); 34 34 } 35 35 36 StringObject::StringObject(JSObject* proto , JSString* string)37 : JSWrapperObject(proto)36 StringObject::StringObject(JSObject* prototype, JSString* string) 37 : JSWrapperObject(prototype) 38 38 { 39 setInternalValue(string);39 setInternalValue(string); 40 40 } 41 41 42 StringObject::StringObject(ExecState* exec, JSObject* proto , const UString& string)43 : JSWrapperObject(proto)42 StringObject::StringObject(ExecState* exec, JSObject* prototype, const UString& string) 43 : JSWrapperObject(prototype) 44 44 { 45 setInternalValue(jsString(exec, string));45 setInternalValue(jsString(exec, string)); 46 46 } 47 47 … … 67 67 } 68 68 69 bool StringObject::deleteProperty(ExecState *exec, const Identifier &propertyName)69 bool StringObject::deleteProperty(ExecState* exec, const Identifier& propertyName) 70 70 { 71 if (propertyName == exec->propertyNames().length)72 return false;73 return JSObject::deleteProperty(exec, propertyName);71 if (propertyName == exec->propertyNames().length) 72 return false; 73 return JSObject::deleteProperty(exec, propertyName); 74 74 } 75 75 76 76 void StringObject::getPropertyNames(ExecState* exec, PropertyNameArray& propertyNames) 77 77 { 78 int size = internalValue()->value().size();79 for (int i = 0; i < size; i++)80 propertyNames.add(Identifier(exec, UString::from(i)));81 return JSObject::getPropertyNames(exec, propertyNames);78 int size = internalValue()->value().size(); 79 for (int i = 0; i < size; ++i) 80 propertyNames.add(Identifier(exec, UString::from(i))); 81 return JSObject::getPropertyNames(exec, propertyNames); 82 82 } 83 83
Note:
See TracChangeset
for help on using the changeset viewer.