Changeset 34659 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Jun 19, 2008, 10:29:29 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r34607 r34659 81 81 inline StringObject* StringObject::create(ExecState* exec, JSString* string) 82 82 { 83 return new StringObject(exec->lexicalGlobalObject()->stringPrototype(), string);83 return new (exec) StringObject(exec->lexicalGlobalObject()->stringPrototype(), string); 84 84 } 85 85 … … 94 94 } 95 95 96 JSValue* JSString::lengthGetter(ExecState* , const Identifier&, const PropertySlot& slot)97 { 98 return jsNumber( static_cast<JSString*>(slot.slotBase())->value().size());99 } 100 101 JSValue* JSString::indexGetter(ExecState* , const Identifier&, const PropertySlot& slot)102 { 103 return jsString( static_cast<JSString*>(slot.slotBase())->value().substr(slot.index(), 1));104 } 105 106 JSValue* JSString::indexNumericPropertyGetter(ExecState* , unsigned index, const PropertySlot& slot)107 { 108 return jsString( static_cast<JSString*>(slot.slotBase())->value().substr(index, 1));96 JSValue* JSString::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 97 { 98 return jsNumber(exec, static_cast<JSString*>(slot.slotBase())->value().size()); 99 } 100 101 JSValue* JSString::indexGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 102 { 103 return jsString(exec, static_cast<JSString*>(slot.slotBase())->value().substr(slot.index(), 1)); 104 } 105 106 JSValue* JSString::indexNumericPropertyGetter(ExecState* exec, unsigned index, const PropertySlot& slot) 107 { 108 return jsString(exec, static_cast<JSString*>(slot.slotBase())->value().substr(index, 1)); 109 109 } 110 110
Note:
See TracChangeset
for help on using the changeset viewer.