Ignore:
Timestamp:
Jul 12, 2006, 2:55:55 AM (19 years ago)
Author:
mjs
Message:

4eviewed by Geoff.


  • add handling of hasInstance callback for API objects
  • API/JSCallbackObject.cpp: (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present. (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
  • API/JSCallbackObject.h:
  • API/JSClassRef.cpp:
  • API/JSObjectRef.h:
  • API/testapi.c: (MyObject_hasInstance): Test case; should match what construct would do.
  • API/testapi.js:
File:
1 edited

Legend:

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

    r15310 r15384  
    5555    virtual JSObject* construct(ExecState*, const List& args);
    5656
     57    virtual bool implementsHasInstance() const;
     58    virtual bool hasInstance(ExecState *exec, JSValue *value);
     59
    5760    virtual bool implementsCall() const;
    5861    virtual JSValue* callAsFunction(ExecState*, JSObject* thisObj, const List &args);
Note: See TracChangeset for help on using the changeset viewer.