Changeset 15385 in webkit for trunk/JavaScriptCore/API/testapi.c


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/API/testapi.c

    r15384 r15385  
    163163}
    164164
    165 static void MyObject_getPropertyList(JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception)
     165static void MyObject_addPropertiesToList(JSObjectRef object, JSPropertyListRef propertyList)
    166166{
    167167    UNUSED_PARAM(context);
     
    246246    MyObject_setProperty,
    247247    MyObject_deleteProperty,
    248     MyObject_getPropertyList,
     248    MyObject_addPropertiesToList,
    249249    MyObject_callAsFunction,
    250250    MyObject_callAsConstructor,
     
    538538    JSObjectSetProperty(context, o, jsOneIString, JSValueMakeNumber(1), kJSPropertyAttributeNone);
    539539    JSObjectSetProperty(context, o, jsCFIString,  JSValueMakeNumber(1), kJSPropertyAttributeDontEnum);
    540     JSPropertyEnumeratorRef enumerator = JSObjectCreatePropertyEnumerator(context, o);
     540    JSPropertyEnumeratorRef enumerator = JSObjectCreatePropertyEnumerator(o);
    541541    int count = 0;
    542542    while (JSPropertyEnumeratorGetNextName(enumerator))
Note: See TracChangeset for help on using the changeset viewer.