Ignore:
Timestamp:
Jul 16, 2006, 6:48:27 PM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Properly document and handle NULL callbacks for static properties. We throw an exception in any case other than a ReadOnly property with a NULL setProperty callback, because a NULL callback almost certainly indicates a programming error. Also throw an exception if hasProperty returns true for a property that getProperty can't get.


  • If a static setProperty callback returns 'false', to indicate that the property was not set, we no longer forward the set request up the class chain, because that's almost certainly not what the programmer expected.
  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::getOwnPropertySlot): (KJS::JSCallbackObject::put): (KJS::JSCallbackObject::staticValueGetter): (KJS::JSCallbackObject::staticFunctionGetter): (KJS::JSCallbackObject::callbackGetter):
  • API/JSObjectRef.h:
  • API/minidom.js:
  • API/testapi.c: (MyObject_hasProperty):
  • API/testapi.js:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSObjectRef.h

    r15469 r15473  
    263263@field name A null-terminated UTF8 string containing the property's name.
    264264@field getProperty A JSObjectGetPropertyCallback to invoke when getting the property's value.
    265 @field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value.
     265@field setProperty A JSObjectSetPropertyCallback to invoke when setting the property's value. May be NULL if the ReadOnly attribute is set.
    266266@field attributes A logically ORed set of JSPropertyAttributes to give to the property.
    267267*/
Note: See TracChangeset for help on using the changeset viewer.