hotspot/src/share/vm/prims/methodHandles.cpp
changeset 13293 c2b4f191c489
parent 11487 f45d945367d4
child 13391 30245956af37
equal deleted inserted replaced
13292:587bb173cf43 13293:c2b4f191c489
  3178       const char* L_MH_name = (JLINV "MethodHandle");
  3178       const char* L_MH_name = (JLINV "MethodHandle");
  3179       const char* MH_name = L_MH_name+1;
  3179       const char* MH_name = L_MH_name+1;
  3180       jclass MH_class = env->FindClass(MH_name);
  3180       jclass MH_class = env->FindClass(MH_name);
  3181       status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
  3181       status = env->RegisterNatives(MH_class, invoke_methods, sizeof(invoke_methods)/sizeof(JNINativeMethod));
  3182     }
  3182     }
       
  3183     if (!env->ExceptionOccurred()) {
       
  3184       status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
       
  3185     }
  3183     if (env->ExceptionOccurred()) {
  3186     if (env->ExceptionOccurred()) {
  3184       warning("JSR 292 method handle code is mismatched to this JVM.  Disabling support.");
  3187       warning("JSR 292 method handle code is mismatched to this JVM.  Disabling support.");
  3185       enable_MH = false;
  3188       enable_MH = false;
  3186       env->ExceptionClear();
  3189       env->ExceptionClear();
  3187     }
  3190     }
  3188 
  3191 
  3189     status = env->RegisterNatives(MHN_class, call_site_methods, sizeof(call_site_methods)/sizeof(JNINativeMethod));
       
  3190     if (env->ExceptionOccurred()) {
       
  3191       // Exception is okay until 7087357
       
  3192       env->ExceptionClear();
       
  3193     }
       
  3194   }
  3192   }
  3195 
  3193 
  3196   if (enable_MH) {
  3194   if (enable_MH) {
  3197     methodOop raiseException_method = MethodHandles::resolve_raise_exception_method(CHECK);
  3195     methodOop raiseException_method = MethodHandles::resolve_raise_exception_method(CHECK);
  3198     if (raiseException_method != NULL) {
  3196     if (raiseException_method != NULL) {