src/share/vm/prims/jvmtiRedefineClasses.cpp
Print this page
@@ -1407,10 +1407,11 @@
// in order to find the start of the first complete object on the card.
ClassLoaderData* loader_data = the_class->class_loader_data();
ConstantPool* merge_cp_oop =
ConstantPool::allocate(loader_data,
merge_cp_length,
+ the_class->constants()->patched(),
CHECK_(JVMTI_ERROR_OUT_OF_MEMORY));
MergeCPCleaner cp_cleaner(loader_data, merge_cp_oop);
HandleMark hm(THREAD); // make sure handles are cleared before
// MergeCPCleaner clears out merge_cp_oop
@@ -3117,11 +3118,12 @@
assert(scratch_cp->length() >= scratch_cp_length, "sanity check");
// scratch_cp is a merged constant pool and has enough space for a
// worst case merge situation. We want to associate the minimum
// sized constant pool with the klass to save space.
- ConstantPool* cp = ConstantPool::allocate(loader_data, scratch_cp_length, CHECK);
+ ConstantPool* cp = ConstantPool::allocate(loader_data, scratch_cp_length,
+ scratch_cp->patched(), CHECK);
constantPoolHandle smaller_cp(THREAD, cp);
// preserve version() value in the smaller copy
int version = scratch_cp->version();
assert(version != 0, "sanity check");