mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
8155977: ObjectInputStream::resolveClass & resolveProxyClass for platform loader
Reviewed-by: acorn, alanb, chegar, dfuchs
This commit is contained in:
parent
8eed1ef6af
commit
2bbe02b202
1 changed files with 3 additions and 3 deletions
|
@ -3387,14 +3387,14 @@ bool force_verify_field_access(Klass* current_class, Klass* field_class, AccessF
|
||||||
return (!access.is_private() && InstanceKlass::cast(current_class)->is_same_class_package(field_class));
|
return (!access.is_private() && InstanceKlass::cast(current_class)->is_same_class_package(field_class));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the first non-null class loader up the execution stack, or null
|
// Return the first user-defined class loader up the execution stack, or null
|
||||||
// if only code from the null class loader is on the stack.
|
// if only code from the bootstrap or platform class loader is on the stack.
|
||||||
|
|
||||||
JVM_ENTRY(jobject, JVM_LatestUserDefinedLoader(JNIEnv *env))
|
JVM_ENTRY(jobject, JVM_LatestUserDefinedLoader(JNIEnv *env))
|
||||||
for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
|
for (vframeStream vfst(thread); !vfst.at_end(); vfst.next()) {
|
||||||
vfst.skip_reflection_related_frames(); // Only needed for 1.4 reflection
|
vfst.skip_reflection_related_frames(); // Only needed for 1.4 reflection
|
||||||
oop loader = vfst.method()->method_holder()->class_loader();
|
oop loader = vfst.method()->method_holder()->class_loader();
|
||||||
if (loader != NULL) {
|
if (loader != NULL && !SystemDictionary::is_platform_class_loader(loader)) {
|
||||||
return JNIHandles::make_local(env, loader);
|
return JNIHandles::make_local(env, loader);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue