hotspot/src/share/vm/oops/klass.cpp
changeset 46324 8764956ec928
parent 46271 979ebd346ecf
child 46329 53ccc37bda19
--- a/hotspot/src/share/vm/oops/klass.cpp	Fri Mar 10 12:58:37 2017 -0500
+++ b/hotspot/src/share/vm/oops/klass.cpp	Fri Mar 03 23:08:35 2017 -0800
@@ -168,7 +168,7 @@
 
 // "Normal" instantiation is preceeded by a MetaspaceObj allocation
 // which zeros out memory - calloc equivalent.
-// The constructor is also used from init_self_patching_vtbl_list,
+// The constructor is also used from CppVtableCloner,
 // which doesn't zero out the memory before calling the constructor.
 // Need to set the _java_mirror field explicitly to not hit an assert that the field
 // should be NULL before setting it.
@@ -501,6 +501,7 @@
 }
 
 void Klass::restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS) {
+  assert(is_klass(), "ensure C++ vtable is restored");
   TRACE_RESTORE_ID(this);
 
   // If an exception happened during CDS restore, some of these fields may already be