Ignore:
Timestamp:
Jul 16, 2006, 3:17:04 PM (19 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):
File:
1 edited

Legend:

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

    r15376 r15469  
    3737{
    3838public:
    39     JSCallbackFunction(ExecState* exec, JSObjectCallAsFunctionCallback callback);
     39    JSCallbackFunction(ExecState* exec, JSObjectCallAsFunctionCallback callback, const Identifier& name);
    4040
    41     virtual bool implementsCall() const;
    4241    virtual JSValue* callAsFunction(ExecState*, JSObject* thisObj, const List &args);
    43 
    44     void setPrivate(void* data);
    45     void* getPrivate();
    4642
    4743    virtual const ClassInfo *classInfo() const { return &info; }
     
    5248    JSCallbackFunction(const JSCallbackFunction&);
    5349   
    54     void* m_privateData;
    5550    JSObjectCallAsFunctionCallback m_callback;
    5651};
Note: See TracChangeset for help on using the changeset viewer.