mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
removing antiquated aix/jdk1.1.6 hackery
sr=brendan@mozilla.org r=rogerl@netscape.com a=asa@mozilla.org # 158115
This commit is contained in:
parent
6bedafbab1
commit
b3c11d95b2
@ -51,16 +51,4 @@ public class JSUtil {
|
||||
|
||||
return captureStream.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to work around a bug in AIX JDK1.1.6, in which
|
||||
* static initializers are not run when a static field is referenced from
|
||||
* native code. The problem does not manifest itself if the field is
|
||||
* accessed from Java code.
|
||||
*/
|
||||
private static void workAroundAIXJavaBug() {
|
||||
if (java.lang.Void.TYPE == null)
|
||||
java.lang.System.out.println("JDK bug: " +
|
||||
"java.lang.Void.TYPE uninitialized");
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +139,6 @@ jobject jlVoid_TYPE; /* java.lang.Void.TYPE value */
|
||||
jmethodID njJSException_JSException; /* netscape.javascript.JSException constructor */
|
||||
jmethodID njJSException_JSException_wrap;/*netscape.javascript.JSException alternate constructor */
|
||||
jmethodID njJSObject_JSObject; /* netscape.javascript.JSObject constructor */
|
||||
jmethodID njJSUtil_workAroundAIXJavaBug;/* netscape.javascript.JSUtil.workAroundAIXJavaBug() */
|
||||
jmethodID njJSUtil_getStackTrace; /* netscape.javascript.JSUtil.getStackTrace() */
|
||||
jfieldID njJSObject_internal; /* netscape.javascript.JSObject.internal */
|
||||
jfieldID njJSObject_long_internal; /* netscape.javascript.JSObject.long_internal */
|
||||
@ -388,23 +387,6 @@ init_netscape_java_classes(JSJavaVM *jsjava_vm, JNIEnv *jEnv)
|
||||
getStackTrace, "(Ljava/lang/Throwable;)Ljava/lang/String;",
|
||||
njJSUtil);
|
||||
|
||||
#ifdef AIX
|
||||
# define JAVA_STATIC_INITIALIZER_BUG
|
||||
#endif
|
||||
|
||||
#ifdef JAVA_STATIC_INITIALIZER_BUG
|
||||
/* The following is used to work around a bug in AIX JDK1.1.6 (See
|
||||
* #331620), in which static initializers are not run when a
|
||||
* static field is referenced from native code. The problem does
|
||||
* not manifest itself if the field is accessed from Java code, so
|
||||
* we first call some Java code to access the fields of interest
|
||||
* before attempting to read them from native code.
|
||||
*/
|
||||
LOAD_STATIC_METHOD(netscape.javascript.JSUtil,
|
||||
workAroundAIXJavaBug,"()V", njJSUtil);
|
||||
(*jEnv)->CallStaticObjectMethod(jEnv, njJSUtil, njJSUtil_workAroundAIXJavaBug);
|
||||
#endif /* JAVA_STATIC_INITIALIZER_BUG */
|
||||
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user