Commit f727149a authored by ggaren's avatar ggaren

Reviewed by darin.

        - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6265
        Name change regression: Java doesn't know what JavaJSObject is

        Changed strings passed to Java back to original "JSObject".

        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::convertValueToJObject):
        (JavaJSObject::convertJObjectToValue):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@11799 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent da137a55
2005-12-29 Geoffrey Garen <ggaren@apple.com>
Reviewed by darin.
- Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=6265
Name change regression: Java doesn't know what JavaJSObject is
Changed strings passed to Java back to original "JSObject".
* bindings/jni/jni_jsobject.cpp:
(JavaJSObject::convertValueToJObject):
(JavaJSObject::convertJObjectToValue):
2005-12-28 Anders Carlsson <andersca@mac.com>
Reviewed by Maciej.
......
......@@ -380,11 +380,11 @@ jobject JavaJSObject::convertValueToJObject (JSValue *value) const
// location and in the original Java 1.4.2 location.
jclass JSObjectClass;
JSObjectClass = env->FindClass ("sun/plugin/javascript/webkit/JavaJSObject");
JSObjectClass = env->FindClass ("sun/plugin/javascript/webkit/JSObject");
if (!JSObjectClass) {
env->ExceptionDescribe();
env->ExceptionClear();
JSObjectClass = env->FindClass ("apple/applet/JavaJSObject");
JSObjectClass = env->FindClass ("apple/applet/JSObject");
}
jmethodID constructorID = env->GetMethodID (JSObjectClass, "<init>", "(J)V");
......@@ -398,7 +398,7 @@ jobject JavaJSObject::convertValueToJObject (JSValue *value) const
JSValue *JavaJSObject::convertJObjectToValue (jobject theObject) const
{
// Instances of netscape.javascript.JavaJSObject get converted back to
// Instances of netscape.javascript.JSObject get converted back to
// JavaScript objects. All other objects are wrapped. It's not
// possible to pass primitive types from the Java to JavaScript.
// See section 22.7 of 'JavaScript: The Definitive Guide, 4th Edition',
......@@ -406,7 +406,7 @@ JSValue *JavaJSObject::convertJObjectToValue (jobject theObject) const
jobject classOfInstance = callJNIObjectMethod(theObject, "getClass", "()Ljava/lang/Class;");
jstring className = (jstring)callJNIObjectMethod(classOfInstance, "getName", "()Ljava/lang/String;");
if (strcmp(Bindings::JavaString(className).UTF8String(), "netscape.javascript.JavaJSObject") == 0) {
if (strcmp(Bindings::JavaString(className).UTF8String(), "netscape.javascript.JSObject") == 0) {
// Pull the nativeJSObject value from the Java instance. This is a
// pointer to the JSObject.
JNIEnv *env = getJNIEnv();
......
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