34 #include "memory/universe.inline.hpp" |
34 #include "memory/universe.inline.hpp" |
35 #include "oops/instanceKlass.hpp" |
35 #include "oops/instanceKlass.hpp" |
36 #include "oops/objArrayKlass.hpp" |
36 #include "oops/objArrayKlass.hpp" |
37 #include "oops/objArrayOop.hpp" |
37 #include "oops/objArrayOop.hpp" |
38 #include "prims/jvm.h" |
38 #include "prims/jvm.h" |
39 #include "prims/methodHandleWalk.hpp" |
|
40 #include "runtime/arguments.hpp" |
39 #include "runtime/arguments.hpp" |
41 #include "runtime/handles.inline.hpp" |
40 #include "runtime/handles.inline.hpp" |
42 #include "runtime/javaCalls.hpp" |
41 #include "runtime/javaCalls.hpp" |
43 #include "runtime/reflection.hpp" |
42 #include "runtime/reflection.hpp" |
44 #include "runtime/reflectionUtils.hpp" |
43 #include "runtime/reflectionUtils.hpp" |
498 |
497 |
499 // If either is on the other's host_klass chain, access is OK, |
498 // If either is on the other's host_klass chain, access is OK, |
500 // because one is inside the other. |
499 // because one is inside the other. |
501 if (under_host_klass(accessor_ik, accessee) || |
500 if (under_host_klass(accessor_ik, accessee) || |
502 under_host_klass(accessee_ik, accessor)) |
501 under_host_klass(accessee_ik, accessor)) |
503 return true; |
|
504 |
|
505 // Adapter frames can access anything. |
|
506 if (MethodHandleCompiler::klass_is_method_handle_adapter_holder(accessor)) |
|
507 // This is an internal adapter frame from the MethodHandleCompiler. |
|
508 return true; |
502 return true; |
509 |
503 |
510 if (RelaxAccessControlCheck || |
504 if (RelaxAccessControlCheck || |
511 (accessor_ik->major_version() < JAVA_1_5_VERSION && |
505 (accessor_ik->major_version() < JAVA_1_5_VERSION && |
512 accessee_ik->major_version() < JAVA_1_5_VERSION)) { |
506 accessee_ik->major_version() < JAVA_1_5_VERSION)) { |