< prev index next >

src/share/vm/runtime/handles.hpp

Print this page

        

@@ -23,10 +23,11 @@
  */
 
 #ifndef SHARE_VM_RUNTIME_HANDLES_HPP
 #define SHARE_VM_RUNTIME_HANDLES_HPP
 
+#include "gc/shared/barrierSet.hpp"
 #include "oops/oop.hpp"
 #include "oops/oopsHierarchy.hpp"
 
 class InstanceKlass;
 class Klass;

@@ -80,12 +81,12 @@
   Handle(Thread* thread, oop obj);
 
   // General access
   oop     operator () () const                   { return obj(); }
   oop     operator -> () const                   { return non_null_obj(); }
-  bool    operator == (oop o) const              { return obj() == o; }
-  bool    operator == (const Handle& h) const          { return obj() == h.obj(); }
+  bool    operator == (oop o) const              { return oopDesc::bs()->write_barrier(obj()) == oopDesc::bs()->write_barrier(o); }
+  bool    operator == (const Handle& h) const          { return oopDesc::bs()->write_barrier(obj()) == oopDesc::bs()->write_barrier(h.obj()); }
 
   // Null checks
   bool    is_null() const                        { return _handle == NULL; }
   bool    not_null() const                       { return _handle != NULL; }
 
< prev index next >