src/hotspot/share/oops/weakHandle.inline.hpp
changeset 50445 bd6b78feb6a3
parent 49738 a7bc87a63dd8
child 50599 ecc2af326b5f
--- a/src/hotspot/share/oops/weakHandle.inline.hpp	Thu Jun 07 06:27:09 2018 -0400
+++ b/src/hotspot/share/oops/weakHandle.inline.hpp	Thu Jun 07 14:11:56 2018 +0200
@@ -40,4 +40,10 @@
   return RootAccess<ON_PHANTOM_OOP_REF | AS_NO_KEEPALIVE>::oop_load(_obj);
 }
 
+template <WeakHandleType T>
+void WeakHandle<T>::replace(oop with_obj) {
+  RootAccess<ON_PHANTOM_OOP_REF>::oop_store(_obj, with_obj);
+}
+
 #endif // SHARE_VM_OOPS_WEAKHANDLE_INLINE_HPP
+