提交 93031916 编写于 作者: I iklam

8065346: WB_AddToBootstrapClassLoaderSearch calls JvmtiEnv::create_a_jvmti...

8065346: WB_AddToBootstrapClassLoaderSearch calls JvmtiEnv::create_a_jvmti when not in _thread_in_vm state
Summary: Removed ThreadToNativeFromVM and use java_lang_String::as_utf8_string instead
Reviewed-by: dholmes, minqi
上级 bc24886b
......@@ -129,24 +129,22 @@ WB_END
WB_ENTRY(void, WB_AddToBootstrapClassLoaderSearch(JNIEnv* env, jobject o, jstring segment)) {
#if INCLUDE_JVMTI
ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
const char* seg = env->GetStringUTFChars(segment, NULL);
ResourceMark rm;
const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));
JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
jvmtiError err = jvmti_env->AddToBootstrapClassLoaderSearch(seg);
assert(err == JVMTI_ERROR_NONE, "must not fail");
env->ReleaseStringUTFChars(segment, seg);
#endif
}
WB_END
WB_ENTRY(void, WB_AddToSystemClassLoaderSearch(JNIEnv* env, jobject o, jstring segment)) {
#if INCLUDE_JVMTI
ThreadToNativeFromVM ttnfv(thread); // can't be in VM when we call JNI
const char* seg = env->GetStringUTFChars(segment, NULL);
ResourceMark rm;
const char* seg = java_lang_String::as_utf8_string(JNIHandles::resolve_non_null(segment));
JvmtiEnv* jvmti_env = JvmtiEnv::create_a_jvmti(JVMTI_VERSION);
jvmtiError err = jvmti_env->AddToSystemClassLoaderSearch(seg);
assert(err == JVMTI_ERROR_NONE, "must not fail");
env->ReleaseStringUTFChars(segment, seg);
#endif
}
WB_END
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册