Reviewed by Maciej.
authorggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2006 08:20:28 +0000 (08:20 +0000)
committerggaren <ggaren@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Jul 2006 08:20:28 +0000 (08:20 +0000)
commit050ed88e8d9a95a8186c58a25dd501448ac34e01
treedf5a8b1cc7e27ec31c24e296ab98db49eaf1efef
parente679000e7e3423af98976b8eb5976f3d6f6db170
    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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
JavaScriptCore/API/JSCallbackConstructor.cpp
JavaScriptCore/API/JSCallbackConstructor.h
JavaScriptCore/API/JSCallbackFunction.cpp
JavaScriptCore/API/JSCallbackFunction.h
JavaScriptCore/API/JSNode.c
JavaScriptCore/API/JSNode.h
JavaScriptCore/API/JSObjectRef.cpp
JavaScriptCore/API/JSObjectRef.h
JavaScriptCore/API/minidom.c
JavaScriptCore/API/minidom.js
JavaScriptCore/API/testapi.c
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/internal.cpp
JavaScriptCore/kjs/internal.h
JavaScriptCore/kjs/object.cpp