hotspot/src/share/vm/code/codeCache.cpp
changeset 30603 a8754858a7fc
parent 30601 faffde6a6773
parent 30296 95baefac8485
child 30607 035f5801a92e
--- a/hotspot/src/share/vm/code/codeCache.cpp	Fri May 01 09:40:08 2015 +0200
+++ b/hotspot/src/share/vm/code/codeCache.cpp	Sat May 02 18:40:37 2015 -0700
@@ -1068,8 +1068,11 @@
   int marked = 0;
   {
     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
-    InstanceKlass* call_site_klass = InstanceKlass::cast(call_site->klass());
-    marked = call_site_klass->mark_dependent_nmethods(changes);
+    InstanceKlass* ctxk = MethodHandles::get_call_site_context(call_site());
+    if (ctxk == NULL) {
+      return; // No dependencies to invalidate yet.
+    }
+    marked = ctxk->mark_dependent_nmethods(changes);
   }
   if (marked > 0) {
     // At least one nmethod has been marked for deoptimization