hotspot/src/share/vm/oops/instanceMirrorKlass.cpp
changeset 10742 a64c942e4e6b
parent 8725 8c1e3dd5fe1b
child 13728 882756847a04
--- a/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp	Mon Oct 17 11:00:41 2011 -0700
+++ b/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp	Mon Oct 17 21:38:29 2011 -0700
@@ -288,15 +288,7 @@
   // Query before forming handle.
   int size = instance_size(k);
   KlassHandle h_k(THREAD, as_klassOop());
-  instanceOop i;
-
-  if (JavaObjectsInPerm) {
-    i = (instanceOop) CollectedHeap::permanent_obj_allocate(h_k, size, CHECK_NULL);
-  } else {
-    assert(ScavengeRootsInCode > 0, "must be");
-    i = (instanceOop) CollectedHeap::obj_allocate(h_k, size, CHECK_NULL);
-  }
-
+  instanceOop i = (instanceOop) CollectedHeap::Class_obj_allocate(h_k, size, k, CHECK_NULL);
   return i;
 }