Closed
Bug 256931
Opened 21 years ago
Closed 21 years ago
Java to Javascript broke due to getJavaWrapper fails to be invoked.
Categories
(Core Graveyard :: Java: Live Connect, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: xiaobin.lu, Assigned: yuanyi21)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1
Build Identifier: 20040825
GetJavaWrapper is never get called now since the fix of 239562 has been checked
in. The reason is the patch for 239562 changed the wrong place. Now with the OJI
is defined, get_java_wrapper will never be called.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
| Reporter | ||
Updated•21 years ago
|
Assignee: live-connect → kyle.yuan
I tried the recent trunk build, it works for me. There are only 2 callers of
get_java_wrapper, one is jsj_JSObject.c, line 174 which is inside a #ifdef
PRESERVE_JSOBJECT_IDENTITY block (line 73 - 248), another is jsj_JSObject.c,
line 274 which is inside a #ifndef OJI block (line 271 - 279). Since
PRESERVE_JSOBJECT_IDENTITY is undefined and OJI is defined, get_java_wrapper
indeed is not called for years.
Could you point out which part of the patch for 239562 changed the wrong place?
| Reporter | ||
Comment 2•21 years ago
|
||
I am referring jsj_JSObject.c
#ifndef OJI
272 java_wrapper_obj =
273 (*jEnv)->NewObject(jEnv, njJSObject, njJSObject_JSObject,
(lcjsobject)handle);
274 if (JSJ_callbacks && JSJ_callbacks->get_java_wrapper != NULL) {
275 java_wrapper_obj = JSJ_callbacks->get_java_wrapper(jEnv,
(lcjsobject)handle);
276 } else {
277 java_wrapper_obj = NULL;
278 }
279 #endif /*! OJI */
280 if (!java_wrapper_obj) {
281 jsj_UnexpectedJavaError(cx, jEnv, "Couldn't create new instance of "
282 "netscape.javascript.JSObject");
283 goto done;
284 }
285
Obviously, you forgot an "#else" between line 273 & 274. That makes your change
never be called.
Summary: Javascript to Java broke due to getJavaWrapper fails to be invoked. → Java to Javascript broke due to getJavaWrapper fails to be invoked.
OK, it was my fault. Fixed.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•