Ignore:
Timestamp:
Jun 19, 2008, 10:29:29 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Prepare JavaScript heap for being per-thread.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.cpp

    r34607 r34659  
    8181inline StringObject* StringObject::create(ExecState* exec, JSString* string)
    8282{
    83     return new StringObject(exec->lexicalGlobalObject()->stringPrototype(), string);
     83    return new (exec) StringObject(exec->lexicalGlobalObject()->stringPrototype(), string);
    8484}
    8585
     
    9494}
    9595
    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));
     96JSValue* JSString::lengthGetter(ExecState* exec, const Identifier&, const PropertySlot& slot)
     97{
     98    return jsNumber(exec, static_cast<JSString*>(slot.slotBase())->value().size());
     99}
     100
     101JSValue* 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
     106JSValue* JSString::indexNumericPropertyGetter(ExecState* exec, unsigned index, const PropertySlot& slot)
     107{
     108    return jsString(exec, static_cast<JSString*>(slot.slotBase())->value().substr(index, 1));
    109109}
    110110
Note: See TracChangeset for help on using the changeset viewer.