src/share/vm/prims/methodHandles.cpp

changeset 3928
56c4f88474b3
parent 3434
15d394228cfa
child 3969
1d7922586cf6
     1.1 --- a/src/share/vm/prims/methodHandles.cpp	Fri Jul 13 17:48:26 2012 -0700
     1.2 +++ b/src/share/vm/prims/methodHandles.cpp	Mon Jul 16 11:14:41 2012 -0700
     1.3 @@ -3180,17 +3180,15 @@
     1.4        jclass MH_class = env->FindClass(MH_name);
     1.5        status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
     1.6      }
     1.7 +    if (!env->ExceptionOccurred()) {
     1.8 +      status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
     1.9 +    }
    1.10      if (env->ExceptionOccurred()) {
    1.11        warning("JSR 292 method handle code is mismatched to this JVM.  Disabling support.");
    1.12        enable_MH = false;
    1.13        env->ExceptionClear();
    1.14      }
    1.15  
    1.16 -    status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
    1.17 -    if (env->ExceptionOccurred()) {
    1.18 -      // Exception is okay until 7087357
    1.19 -      env->ExceptionClear();
    1.20 -    }
    1.21    }
    1.22  
    1.23    if (enable_MH) {

mercurial