< prev index next >
src/share/vm/runtime/handles.cpp
Print this page
*** 32,42 ****
#ifdef ASSERT
oop* HandleArea::allocate_handle(oop obj) {
assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
! assert(obj->is_oop(), "not an oop: " INTPTR_FORMAT, p2i(obj));
return real_allocate_handle(obj);
}
#endif
// Copy constructors and destructors for metadata handles
--- 32,42 ----
#ifdef ASSERT
oop* HandleArea::allocate_handle(oop obj) {
assert(_handle_mark_nesting > 1, "memory leak: allocating handle outside HandleMark");
assert(_no_handle_mark_nesting == 0, "allocating handle inside NoHandleMark");
! assert(oopDesc::is_oop(obj), "not an oop: " INTPTR_FORMAT, p2i(obj));
return real_allocate_handle(obj);
}
#endif
// Copy constructors and destructors for metadata handles
*** 97,107 ****
// during GC phase 3, a handle may be a forward pointer that
// is not yet valid, so loosen the assertion
while (bottom < top) {
// This test can be moved up but for now check every oop.
! assert((*bottom)->is_oop(), "handle should point to oop");
f->do_oop(bottom++);
}
return handles_visited;
}
--- 97,107 ----
// during GC phase 3, a handle may be a forward pointer that
// is not yet valid, so loosen the assertion
while (bottom < top) {
// This test can be moved up but for now check every oop.
! assert(oopDesc::is_oop(*bottom), "handle should point to oop");
f->do_oop(bottom++);
}
return handles_visited;
}
< prev index next >