< prev index next >

src/hotspot/share/classfile/stringTable.cpp

Print this page
@@ -1053,10 +1053,16 @@
  void StringTable::set_shared_strings_array_index(int root_index) {
    _shared_strings_array_root_index = root_index;
  }
  
  void StringTable::serialize_shared_table_header(SerializeClosure* soc) {
+   if (soc->writing() && !HeapShared::can_write()) {
+     _shared_table.reset();
+     _is_two_dimensional_shared_strings_array = false;
+     _shared_strings_array_root_index = -1;
+   }
+ 
    _shared_table.serialize_header(soc);
  
    if (soc->writing()) {
      // Sanity. Make sure we don't use the shared table at dump time
      _shared_table.reset();
< prev index next >