mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8230043: Lazily load libverify
8230140: Remove unused mutex and monitor declarations Reviewed-by: hseigel, erikj, alanb, dholmes
This commit is contained in:
parent
204ed44122
commit
fba19ffbb2
12 changed files with 74 additions and 152 deletions
|
@ -30,14 +30,11 @@
|
|||
#include "jni_util.h"
|
||||
#include "jlong.h"
|
||||
#include "jvm.h"
|
||||
#include "check_classname.h"
|
||||
#include "java_lang_ClassLoader.h"
|
||||
#include "java_lang_ClassLoader_NativeLibrary.h"
|
||||
#include <string.h>
|
||||
|
||||
/* defined in libverify.so/verify.dll (src file common/check_format.c) */
|
||||
extern jboolean VerifyClassname(char *utf_name, jboolean arrayAllowed);
|
||||
extern jboolean VerifyFixClassname(char *utf_name);
|
||||
|
||||
static JNINativeMethod methods[] = {
|
||||
{"retrieveDirectives", "()Ljava/lang/AssertionStatusDirectives;", (void *)&JVM_AssertionStatusDirectives}
|
||||
};
|
||||
|
@ -120,7 +117,7 @@ Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
|
|||
if (utfName == NULL) {
|
||||
goto free_body;
|
||||
}
|
||||
VerifyFixClassname(utfName);
|
||||
fixClassname(utfName);
|
||||
} else {
|
||||
utfName = NULL;
|
||||
}
|
||||
|
@ -185,7 +182,7 @@ Java_java_lang_ClassLoader_defineClass2(JNIEnv *env,
|
|||
JNU_ThrowOutOfMemoryError(env, NULL);
|
||||
return result;
|
||||
}
|
||||
VerifyFixClassname(utfName);
|
||||
fixClassname(utfName);
|
||||
} else {
|
||||
utfName = NULL;
|
||||
}
|
||||
|
@ -231,9 +228,9 @@ Java_java_lang_ClassLoader_findBootstrapClass(JNIEnv *env, jobject loader,
|
|||
JNU_ThrowOutOfMemoryError(env, NULL);
|
||||
return NULL;
|
||||
}
|
||||
VerifyFixClassname(clname);
|
||||
fixClassname(clname);
|
||||
|
||||
if (!VerifyClassname(clname, JNI_TRUE)) { /* expects slashed name */
|
||||
if (!verifyClassname(clname, JNI_TRUE)) { /* expects slashed name */
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue