changeset 2206:d2134498fd3f

7011865: JSR 292 CTW fails: !THREAD->is_Compiler_thread() failed: Can not load classes with the Compiler thre Reviewed-by: kvn, never
author jrose
date Thu, 17 Mar 2011 18:29:18 -0700
parents 82de9bd880e3
children fc5ebbb2d1a8
files src/share/vm/interpreter/linkResolver.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/interpreter/linkResolver.cpp	Thu Mar 17 12:08:01 2011 -0700
+++ b/src/share/vm/interpreter/linkResolver.cpp	Thu Mar 17 18:29:18 2011 -0700
@@ -217,7 +217,7 @@
   if (EnableMethodHandles &&
       klass() == SystemDictionary::MethodHandle_klass() &&
       methodOopDesc::is_method_handle_invoke_name(name)) {
-    if (!MethodHandles::enabled()) {
+    if (!THREAD->is_Compiler_thread() && !MethodHandles::enabled()) {
       // Make sure the Java part of the runtime has been booted up.
       klassOop natives = SystemDictionary::MethodHandleNatives_klass();
       if (natives == NULL || instanceKlass::cast(natives)->is_not_initialized()) {