Commit 8a518610 authored by andersca's avatar andersca

JavaScriptCore:

        Reviewed by Darin, landed by Anders.

        Fix for: http://bugs.webkit.org/show_bug.cgi?id=13142

        The previous fix http://bugs.webkit.org/show_bug.cgi?id=12636 
        introduced new JNIType to enum in jni_utility.h This is a 
        problem on the Mac as it seems that the JNIType enum is also
        used in the JVM, it is used to specify the return type in
        jni_objc.mm
        Corrected the fix by moving type to the end, and changing
        jni_objc.mm to convert the new type to an old compatible
        type.

        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall):
        * bindings/jni/jni_utility.h:

WebCore:

        Reviewed by Darin, landed by Anders.

        Manual test case for http://bugs.webkit.org/show_bug.cgi?id=13142

        * manual-tests/liveconnect-applet-get-boolean.html: Added.
        * manual-tests/resources/CheckerApplet.class: Added.
        * manual-tests/resources/CheckerApplet.java: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f11a584
2007-03-26 David Carson <dacarson@gmail.com>
Reviewed by Darin, landed by Anders.
Fix for: http://bugs.webkit.org/show_bug.cgi?id=13142
The previous fix http://bugs.webkit.org/show_bug.cgi?id=12636
introduced new JNIType to enum in jni_utility.h This is a
problem on the Mac as it seems that the JNIType enum is also
used in the JVM, it is used to specify the return type in
jni_objc.mm
Corrected the fix by moving type to the end, and changing
jni_objc.mm to convert the new type to an old compatible
type.
* bindings/jni/jni_objc.mm:
(KJS::Bindings::dispatchJNICall):
* bindings/jni/jni_utility.h:
2007-03-26 Christopher Brichford <chrisb@adobe.com>
Reviewed/landed by Adam.
......
......@@ -44,6 +44,10 @@ bool KJS::Bindings::dispatchJNICall (const void *targetAppletView, jobject obj,
{
id view = (id)targetAppletView;
// As array_type is not known by the Mac JVM, change it to a compatible type.
if (returnType == array_type)
returnType = object_type;
if ([view respondsToSelector:@selector(webPlugInCallJava:isStatic:returnType:method:arguments:callingURL:exceptionDescription:)]) {
NSString *_exceptionDescription = 0;
......
......@@ -29,11 +29,15 @@
#include <JavaVM/jni.h>
// The order of these items can not be modified as they are tightly
// bound with the JVM on Mac OSX. If new types need to be added, they
// should be added to the end. It is used in jni_obc.mm when calling
// through to the JVM. Newly added items need to be made compatible
// in that file.
typedef enum {
invalid_type = 0,
void_type,
object_type,
array_type,
boolean_type,
byte_type,
char_type,
......@@ -41,7 +45,8 @@ typedef enum {
int_type,
long_type,
float_type,
double_type
double_type,
array_type
} JNIType;
namespace KJS {
......
2007-03-26 David Carson <dacarson@gmail.com>
Reviewed by Darin, landed by Anders.
Manual test case for http://bugs.webkit.org/show_bug.cgi?id=13142
* manual-tests/liveconnect-applet-get-boolean.html: Added.
* manual-tests/resources/CheckerApplet.class: Added.
* manual-tests/resources/CheckerApplet.java: Added.
2007-03-26 Mitz Pettel <mitz@webkit.org>
Reviewed and landed by Darin.
......
<html>
<body><applet code="CheckerApplet.class" name="Checker" codebase="resources">
Unable to load applet.</applet>
This tests retrieving a boolean value from a Java class using javascript. It tests the return value. The return value should be true.<br>
<input type="button" name="test" value="Read applet" onClick="alert('return value: '+document.Checker.checkVersion())"/>
</body>
<html>
import java.applet.Applet;
import java.awt.Color;
import java.awt.Component;
public class CheckerApplet extends Applet
{
public boolean checkVersion()
{
return true;
}
public void start()
{
setBackground(new Color(255, 255, 255));
}
public CheckerApplet()
{
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment