Ignore:
Timestamp:
Aug 4, 2007, 10:20:35 PM (18 years ago)
Author:
mjs
Message:

Reviewed by Darin and Adam.


<rdar://problem/5368990> REGRESSION: newsgator.com sign-on 6x slower than Safari 3 beta due to GC changes (14808)

  • kjs/string_object.cpp: (KJS::replace): if the string didn't change (very common in some cases) reuse the original string value. (KJS::StringProtoFunc::callAsFunction): Pass in the StringImp* when replacing, not just the UString.
  • kjs/string_object.h: (KJS::StringInstance::internalValue): covariant override to return StringImp for convenience
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/string_object.h

    r24633 r24873  
    4242    virtual const ClassInfo *classInfo() const { return &info; }
    4343    static const ClassInfo info;
     44
     45    StringImp* internalValue() const { return static_cast<StringImp*>(JSWrapperObject::internalValue());}
     46
    4447  private:
    4548    static JSValue *lengthGetter(ExecState *exec, JSObject *, const Identifier&, const PropertySlot &slot);
Note: See TracChangeset for help on using the changeset viewer.