Show
Ignore:
Timestamp:
07/16/06 15:17:04 (2 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Added names to functions.


  • Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors. The private data idiom is that a JS object stores its native implementation as private data. For functions and constructors, the native implementation is nothing more than the callback they already store, so supporting private data, too, confuses the idiom. If you *really* want, you can still create a custom function with private data.
  • API/JSCallbackConstructor.cpp:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackFunction.cpp: (KJS::JSCallbackFunction::JSCallbackFunction):
  • API/JSCallbackFunction.h:
  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::staticFunctionGetter):
  • API/JSObjectRef.cpp: (JSObjectMakeFunction): (JSObjectMakeFunctionWithBody): (JSObjectGetPrivate): (JSObjectSetPrivate):
  • API/JSObjectRef.h:
  • API/minidom.c: (main):
  • API/testapi.c: (main):
Files:
1 modified

Legend:

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

    r15376 r15469  
    4141    virtual JSObject* construct(ExecState*, const List &args); 
    4242 
    43     void setPrivate(void* data); 
    44     void* getPrivate(); 
    45  
    4643    virtual const ClassInfo *classInfo() const { return &info; } 
    4744    static const ClassInfo info; 
     
    5148    JSCallbackConstructor(const JSCallbackConstructor&); 
    5249     
    53     void* m_privateData; 
    5450    JSObjectCallAsConstructorCallback m_callback; 
    5551};