Changeset 15482 in webkit for trunk/JavaScriptCore/kjs/internal.h


Ignore:
Timestamp:
Jul 17, 2006, 1:20:28 AM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback, to match JSObjectMakeFunctionWithCallback.


  • Added prototype parameter, so the generated constructor automatically works with hasInstance / instanceof


  • Moved hasInstance implementation from InternalFunctionImp to JSObject so that subclasses can inherit it without inheriting function-related baggage. More refactoring here would be good, but this seems like a good short-term solution.

(KJS::JSCallbackFunction::implementsHasInstance): override and return false,
because callback functions aren't constructors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/internal.h

    r14834 r15482  
    155155    virtual JSValue* callAsFunction(ExecState*, JSObject* thisObjec, const List& args) = 0;
    156156    virtual bool implementsHasInstance() const;
    157     virtual bool hasInstance(ExecState*, JSValue*);
    158157
    159158    virtual const ClassInfo* classInfo() const { return &info; }
Note: See TracChangeset for help on using the changeset viewer.