< prev index next >
src/hotspot/share/runtime/handles.cpp
Print this page
rev 49275 : [mq]: JDK-8199781.patch
@@ -28,10 +28,18 @@
#include "oops/oop.inline.hpp"
#include "runtime/atomic.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/thread.inline.hpp"
+bool Handle::operator == (oop o) const {
+ return oopDesc::equals(obj(), o);
+}
+
+bool Handle::operator == (const Handle& h) const {
+ return oopDesc::equals(obj(), h.obj());
+}
+
#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));
< prev index next >