Bug 12731 - JNI conversion to Object[] array doesn't work
Summary: JNI conversion to Object[] array doesn't work
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: LayoutTestFailure
Depends on: 12636
Blocks:
  Show dependency treegraph
 
Reported: 2007-02-10 20:46 PST by David Kilzer (:ddkilzer)
Modified: 2008-07-06 19:50 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2007-02-10 20:46:11 PST
The "Send object array" test from Bug 12636 throws an exception:

/path/to/WebKit/JavaScriptCore/bindings/jni/jni_instance.cpp:126 -- invokeMethod:  call objectFunction ([Ljava/lang/Object;)V on 0xfc0fd7c
/path/to/WebKit/JavaScriptCore/bindings/jni/jni_instance.cpp:137 -- invokeMethod:  arg[0] = 0.1,0.1,0.2
objectArray called
java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.plugin.liveconnect.SecureInvocation$2.run(SecureInvocation.java:212)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.plugin.liveconnect.SecureInvocation.CallMethod(SecureInvocation.java:191)
        at sun.plugin.liveconnect.SecureInvocation.access$300(SecureInvocation.java:51)
        at sun.plugin.liveconnect.SecureInvocation$CallMethodThread.run(SecureInvocation.java:122)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.plugin.javascript.invoke.JSInvoke.invoke(JSInvoke.java:19)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at sun.plugin.javascript.JSClassLoader.invoke(JSClassLoader.java:44)
        at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(SecureInvocation.java:580)
        ... 6 more
Caused by: java.lang.NullPointerException
        at ArrayParameterTestApplet.objectFunction(ArrayParameterTestApplet.java:86)
        ... 17 more
(event handler):java.security.PrivilegedActionException: java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException

Path to manual test:  WebCore/manual-tests/liveconnect-applet-array-parameters.html
Comment 1 David Kilzer (:ddkilzer) 2007-02-10 20:48:24 PST
Also I think this method in ArrayParameterTestApplet.java:

    public void objectFunction(Applet[] array) {

should look like this:

    public void objectFunction(Object[] array) {

Changing this still doesn't fix the issue, though.

Comment 2 David Kilzer (:ddkilzer) 2008-07-06 19:50:33 PDT
This behavior isn't wrong, it's one of the tests to make sure that WebKit doesn't crash when using a non-String array argument.