diff src/share/vm/oops/method.cpp @ 10276:f0bc60565ba8

7196277: JSR 292: Two jck/runtime tests crash on java.lang.invoke.MethodHandle.invokeExact Reviewed-by: jrose, kvn
author twisti
date Mon, 06 May 2013 13:53:13 -0700
parents 0cfa93c2fcc4
children e484fe2abebd
line wrap: on
line diff
--- a/src/share/vm/oops/method.cpp	Fri May 03 15:35:30 2013 -0700
+++ b/src/share/vm/oops/method.cpp	Mon May 06 13:53:13 2013 -0700
@@ -832,7 +832,9 @@
   assert(entry != NULL, "interpreter entry must be non-null");
   // Sets both _i2i_entry and _from_interpreted_entry
   set_interpreter_entry(entry);
-  if (is_native() && !is_method_handle_intrinsic()) {
+
+  // Don't overwrite already registered native entries.
+  if (is_native() && !has_native_function()) {
     set_native_function(
       SharedRuntime::native_method_throw_unsatisfied_link_error_entry(),
       !native_bind_event_is_interesting);