Mercurial > hg > truffle
comparison src/share/vm/prims/methodHandles.cpp @ 11198:1e6d5dec4a4e
Merge.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Mon, 05 Aug 2013 13:20:06 +0200 |
parents | 6b0fd0964b87 |
children | cefad50507d8 |
comparison
equal
deleted
inserted
replaced
11197:3479ab380552 | 11198:1e6d5dec4a4e |
---|---|
1135 // The trusted Java code that calls this method should already have performed | 1135 // The trusted Java code that calls this method should already have performed |
1136 // access checks on behalf of the given caller. But, we can verify this. | 1136 // access checks on behalf of the given caller. But, we can verify this. |
1137 if (VerifyMethodHandles && caller_jh != NULL && | 1137 if (VerifyMethodHandles && caller_jh != NULL && |
1138 java_lang_invoke_MemberName::clazz(mname()) != NULL) { | 1138 java_lang_invoke_MemberName::clazz(mname()) != NULL) { |
1139 Klass* reference_klass = java_lang_Class::as_Klass(java_lang_invoke_MemberName::clazz(mname())); | 1139 Klass* reference_klass = java_lang_Class::as_Klass(java_lang_invoke_MemberName::clazz(mname())); |
1140 if (reference_klass != NULL) { | 1140 if (reference_klass != NULL && reference_klass->oop_is_objArray()) { |
1141 reference_klass = ObjArrayKlass::cast(reference_klass)->bottom_klass(); | |
1142 } | |
1143 | |
1144 // Reflection::verify_class_access can only handle instance classes. | |
1145 if (reference_klass != NULL && reference_klass->oop_is_instance()) { | |
1141 // Emulate LinkResolver::check_klass_accessability. | 1146 // Emulate LinkResolver::check_klass_accessability. |
1142 Klass* caller = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(caller_jh)); | 1147 Klass* caller = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(caller_jh)); |
1143 if (!Reflection::verify_class_access(caller, | 1148 if (!Reflection::verify_class_access(caller, |
1144 reference_klass, | 1149 reference_klass, |
1145 true)) { | 1150 true)) { |