hotspot/src/share/vm/runtime/handles.inline.hpp
changeset 15099 b31d40895bbb
parent 14583 d70ee55535f4
child 20059 c26474fd5ac0
--- a/hotspot/src/share/vm/runtime/handles.inline.hpp	Mon Dec 24 11:46:38 2012 -0800
+++ b/hotspot/src/share/vm/runtime/handles.inline.hpp	Wed Jan 02 20:28:09 2013 -0500
@@ -80,6 +80,8 @@
       _thread = Thread::current();                                     \
     }                                                                  \
     _thread->metadata_handles()->push((Metadata*)_value);              \
+  } else {                                                             \
+    _thread = NULL;                                                    \
   }                                                                    \
 }                                                                      \
 inline name##Handle& name##Handle::operator=(const name##Handle &s) {  \
@@ -94,6 +96,8 @@
       _thread = Thread::current();                                     \
     }                                                                  \
     _thread->metadata_handles()->push((Metadata*)_value);              \
+  } else {                                                             \
+    _thread = NULL;                                                    \
   }                                                                    \
   return *this;                                                        \
 }                                                                      \