mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-13 12:38:07 +00:00
8283784: java_lang_String::as_platform_dependent_str stores to oop in native state
Reviewed-by: kbarrett, shade, stefank
This commit is contained in:
parent
fbb8ca55a8
commit
c9a469a459
@ -454,16 +454,18 @@ char* java_lang_String::as_platform_dependent_str(Handle java_string, TRAPS) {
|
||||
}
|
||||
|
||||
char *native_platform_string;
|
||||
{ JavaThread* thread = THREAD;
|
||||
jstring js = (jstring) JNIHandles::make_local(thread, java_string());
|
||||
bool is_copy;
|
||||
JavaThread* thread = THREAD;
|
||||
jstring js = (jstring) JNIHandles::make_local(thread, java_string());
|
||||
{
|
||||
HandleMark hm(thread);
|
||||
ThreadToNativeFromVM ttn(thread);
|
||||
JNIEnv *env = thread->jni_environment();
|
||||
bool is_copy;
|
||||
native_platform_string = (_to_platform_string_fn)(env, js, &is_copy);
|
||||
assert(is_copy == JNI_TRUE, "is_copy value changed");
|
||||
JNIHandles::destroy_local(js);
|
||||
}
|
||||
JNIHandles::destroy_local(js);
|
||||
|
||||
return native_platform_string;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user