hotspot/src/share/vm/classfile/systemDictionary.cpp
changeset 3908 24b55ad4c228
parent 3575 224791e7ecab
child 3912 3aaaaad1ccb0
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp	Tue Sep 15 11:09:34 2009 -0700
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp	Tue Sep 15 21:53:47 2009 -0700
@@ -2414,6 +2414,8 @@
                          vmSymbols::makeSite_name(), vmSymbols::makeSite_signature(),
                          &args, CHECK_(empty));
   oop call_site_oop = (oop) result.get_jobject();
+  assert(call_site_oop->is_oop()
+         /*&& sun_dyn_CallSiteImpl::is_instance(call_site_oop)*/, "must be sane");
   sun_dyn_CallSiteImpl::set_vmmethod(call_site_oop, mh_invdyn());
   if (TraceMethodHandles) {
     tty->print_cr("Linked invokedynamic bci=%d site="INTPTR_FORMAT":", caller_bci, call_site_oop);
@@ -2450,6 +2452,8 @@
   oop boot_method_oop = (oop) result.get_jobject();
 
   if (boot_method_oop != NULL) {
+    assert(boot_method_oop->is_oop()
+           && java_dyn_MethodHandle::is_instance(boot_method_oop), "must be sane");
     // probably no race conditions, but let's be careful:
     if (Atomic::cmpxchg_ptr(boot_method_oop, ik->adr_bootstrap_method(), NULL) == NULL)
       ik->set_bootstrap_method(boot_method_oop);