Bug 12731
| Summary: | JNI conversion to Object[] array doesn't work | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Kilzer (:ddkilzer) <ddkilzer> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | dacarson |
| Priority: | P2 | Keywords: | LayoutTestFailure |
| Version: | 420+ | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
| Bug Depends on: | 12636 | ||
| Bug Blocks: | |||
David Kilzer (:ddkilzer)
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
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
David Kilzer (:ddkilzer)
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.
David Kilzer (:ddkilzer)
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.