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/JSObjectRef.h

    r15384 r15385  
    156156@typedef JSObjectAddPropertiesToListCallback
    157157@abstract The callback invoked when adding an object's properties to a property list.
    158 @param context The current execution context.
    159158@param object The JSObject whose properties need to be added to propertyList.
    160159@param propertyList A JavaScript property list that will be used to enumerate object's properties.
    161 @param exception A pointer to a JSValueRef in which to return an exception, if any.
    162160@discussion If you named your function GetPropertyList, you would declare it like this:
    163161
    164 void AddPropertiesToList(JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
     162void AddPropertiesToList(JSObjectRef object, JSPropertyListRef propertyList);
    165163
    166164Use JSPropertyListAdd to add properties to propertyList.
     
    169167*/
    170168typedef void
    171 (*JSObjectAddPropertiesToListCallback) (JSContextRef context, JSObjectRef object, JSPropertyListRef propertyList, JSValueRef* exception);
     169(*JSObjectAddPropertiesToListCallback) (JSObjectRef object, JSPropertyListRef propertyList);
    172170
    173171/*!
     
    261259@field setProperty The callback invoked when setting the value of a given property.
    262260@field deleteProperty The callback invoked when deleting a given property.
    263 @field getPropertyList The callback invoked when adding an object's properties to a property list.
     261@field addPropertiesToList The callback invoked when adding an object's properties to a property list.
    264262@field callAsFunction The callback invoked when an object is called as a function.
    265263@field hasInstance The callback invoked when an object is used in an 'instanceof' expression.
     
    507505@function
    508506@abstract Creates an enumerator for an object's properties.
    509 @param context The execution context to use.
    510507@param object The object whose properties you want to enumerate.
    511508@result A JSPropertyEnumerator with a list of object's properties. Ownership follows the Create Rule.
    512509*/
    513 JSPropertyEnumeratorRef JSObjectCreatePropertyEnumerator(JSContextRef context, JSObjectRef object);
     510JSPropertyEnumeratorRef JSObjectCreatePropertyEnumerator(JSObjectRef object);
    514511/*!
    515512@function
Note: See TracChangeset for help on using the changeset viewer.