8003238: JSR 292: intermittent exception failure with java/lang/invoke/CallSiteTest.java
authortwisti
Fri, 14 Dec 2012 12:06:42 -0800
changeset 14825 8bc43f610c87
parent 14822 ff8e8aa78776
child 14826 c2e4165eeb14
8003238: JSR 292: intermittent exception failure with java/lang/invoke/CallSiteTest.java Reviewed-by: jrose, kvn
hotspot/src/share/vm/prims/methodHandles.cpp
--- a/hotspot/src/share/vm/prims/methodHandles.cpp	Fri Dec 07 18:13:23 2012 -0800
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp	Fri Dec 14 12:06:42 2012 -0800
@@ -1168,8 +1168,8 @@
     // Walk all nmethods depending on this call site.
     MutexLocker mu(Compile_lock, thread);
     Universe::flush_dependents_on(call_site, target);
+    java_lang_invoke_CallSite::set_target(call_site(), target());
   }
-  java_lang_invoke_CallSite::set_target(call_site(), target());
 }
 JVM_END
 
@@ -1180,8 +1180,8 @@
     // Walk all nmethods depending on this call site.
     MutexLocker mu(Compile_lock, thread);
     Universe::flush_dependents_on(call_site, target);
+    java_lang_invoke_CallSite::set_target_volatile(call_site(), target());
   }
-  java_lang_invoke_CallSite::set_target_volatile(call_site(), target());
 }
 JVM_END