Changeset 11805 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Dec 29, 2005, 3:38:57 AM (19 years ago)
- Location:
- trunk/JavaScriptCore/kjs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/string_object.cpp
r11646 r11805 29 29 #include "interpreter.h" 30 30 #include "operations.h" 31 #include "reference_list.h" 31 32 #include "regexp.h" 32 33 #include "regexp_object.h" … … 76 77 const UString s = internalValue()->toString(exec); 77 78 const unsigned length = s.size(); 78 if (index >= length) 79 return false; 79 if (index < length) { 80 80 slot.setCustomIndex(this, index, indexGetter); 81 81 return true; 82 } 82 83 } 83 84 … … 97 98 return false; 98 99 return JSObject::deleteProperty(exec, propertyName); 100 } 101 102 ReferenceList StringInstance::propList(ExecState *exec, bool recursive) 103 { 104 ReferenceList properties = JSObject::propList(exec,recursive); 105 106 //### FIXME: should avoid duplicates with prototype 107 UString str = internalValue()->toString(exec); 108 for (int i = 0; i < str.size(); i++) 109 properties.append(Reference(this, i)); 110 return properties; 99 111 } 100 112 -
trunk/JavaScriptCore/kjs/string_object.h
r11566 r11805 36 36 virtual void put(ExecState *exec, const Identifier &propertyName, JSValue *value, int attr = None); 37 37 virtual bool deleteProperty(ExecState *exec, const Identifier &propertyName); 38 virtual ReferenceList propList(ExecState *exec, bool recursive); 38 39 39 40 virtual const ClassInfo *classInfo() const { return &info; }
Note:
See TracChangeset
for help on using the changeset viewer.