Ignore:
Timestamp:
Jul 12, 2006, 3:01:06 AM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Removed context and exception parameters from JSObjectGetPropertyEnumerator, removing the spurious use of ExecState inside JavaScriptCore that made us think this was necessary in the first place.

(StringInstance::getPropertyList): Use getString instead of toString because
we know we're dealing with a string -- we put it there in the first place.
While we're at it, store the string's size instead of retrieving it each time
through the loop, to avoid the unnecessary killing of puppies.

  • kjs/string_object.h:
File:
1 edited

Legend:

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

    r14951 r15385  
    9595}
    9696
    97 void StringInstance::getPropertyList(ExecState *exec, ReferenceList& propertyList, bool recursive)
     97void StringInstance::getPropertyList(ReferenceList& propertyList, bool recursive)
    9898{
    9999  //### FIXME: should avoid duplicates with prototype
    100   UString str = internalValue()->toString(exec);
    101   for (int i = 0; i < str.size(); i++)
     100  int size = internalValue()->getString().size();
     101  for (int i = 0; i < size; i++)
    102102    propertyList.append(Reference(this, i));
    103   return JSObject::getPropertyList(exec, propertyList, recursive);
     103  return JSObject::getPropertyList(propertyList, recursive);
    104104}
    105105
Note: See TracChangeset for help on using the changeset viewer.