< prev index next >
src/share/vm/runtime/handles.inline.hpp
Print this page
@@ -67,21 +67,21 @@
assert(_thread == Thread::current(), "thread must be current"); \
assert (_thread->is_in_stack((address)this), "not on stack?"); \
_thread->metadata_handles()->push((Metadata*)obj); \
} \
} \
-inline name##Handle::name##Handle(const name##Handle &h) { \
+inline name##Handle::name##Handle(const name##Handle &h, bool check_in_stack) { \
_value = h._value; \
if (_value != NULL) { \
assert(_value->is_valid(), "obj is valid"); \
if (h._thread != NULL) { \
assert(h._thread == Thread::current(), "thread must be current");\
_thread = h._thread; \
} else { \
_thread = Thread::current(); \
} \
- assert (_thread->is_in_stack((address)this), "not on stack?"); \
+ assert (! check_in_stack || _thread->is_in_stack((address)this), "not on stack?"); \
_thread->metadata_handles()->push((Metadata*)_value); \
} else { \
_thread = NULL; \
} \
} \
< prev index next >