Reviewed by Geoff.
authortomernic <tomernic@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Mar 2006 00:15:38 +0000 (00:15 +0000)
committertomernic <tomernic@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 31 Mar 2006 00:15:38 +0000 (00:15 +0000)
commitf951ec15ec1d8c643f3f0c083b2861487aedf1c4
tree926117ca428994122dc4194856c88384214d9cfd
parentc7c95a3d2dd84f2cb7fff32fb34206667bbf03af
    Reviewed by Geoff.

        <rdar://problem/4212626> REGRESSION: LIVECONNECT: JavaScript type for Java Strings is function,
        not object

        * bindings/runtime.h:
        (KJS::Bindings::Instance::implementsCall):
        New method.  Returns false by default.  Concrete subclasses can override this return true when
        the bound object may be called as a function.
        (KJS::Bindings::Instance::invokeDefaultMethod):
        Since bound objects are no longer treated as functions by default, we can return jsUndefined()
        here instead of in concrete subclasses that decide not to implement the default method
        functionality.

        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::implementsCall):
        Don't assume that the bound object is a function; instead, let the object instance decide whether
        it is callable.

        * bindings/c/c_instance.h:
        * bindings/c/c_instance.cpp:
        (KJS::Bindings::CInstance::implementsCall):
        The object is callable if its class has an invokeDefault function.

        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::implementsCall):
        The object is callable if the ObjC instance responds to -invokeDefaultMethodWithArguments:.

        * bindings/jni/jni_instance.h:
        * bindings/jni/jni_instance.cpp:
        Moved bogus invokeDefaultMethod() to superclass.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13589 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/bindings/c/c_instance.cpp
JavaScriptCore/bindings/c/c_instance.h
JavaScriptCore/bindings/jni/jni_instance.cpp
JavaScriptCore/bindings/jni/jni_instance.h
JavaScriptCore/bindings/objc/objc_instance.h
JavaScriptCore/bindings/objc/objc_instance.mm
JavaScriptCore/bindings/runtime.h
JavaScriptCore/bindings/runtime_object.cpp