Changeset 440 for trunk/JavaScriptCore/kjs/JSString.cpp
- Timestamp:
- 08/18/08 11:14:49 (5 months ago)
- Files:
-
- trunk/JavaScriptCore/kjs/JSString.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/JavaScriptCore/kjs/JSString.cpp
r381 r440 83 83 } 84 84 85 JSValue* JSString::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)86 {87 return jsNumber(exec, static_cast<JSString*>(slot.slotBase())->value().size());88 }89 90 JSValue* JSString::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)91 {92 return jsString(exec, static_cast<JSString*>(slot.slotBase())->value().substr(slot.index(), 1));93 }94 95 JSValue* JSString::indexNumericPropertyGetter(ExecState* exec, unsigned index, const PropertySlot& slot)96 {97 return jsString(exec, static_cast<JSString*>(slot.slotBase())->value().substr(index, 1));98 }99 100 85 bool JSString::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 101 86 { … … 120 105 // The semantics here are really getPropertySlot, not getOwnPropertySlot. 121 106 // This function should only be called by JSValue::get. 122 if (getStringPropertySlot( propertyName, slot))107 if (getStringPropertySlot(exec, propertyName, slot)) 123 108 return true; 124 109 return JSString::getOwnPropertySlot(exec, Identifier::from(exec, propertyName), slot);
