Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index 7e823b75b222279306eb1d79772ede372273a827..186b18981a317e1be833423ce77546d99baccf0d 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -1155,14 +1155,11 @@ RawLibrary* Library::ReadFrom(SnapshotReader* reader, |
library.StorePointer((library.raw()->from() + i), |
reader->PassiveObjectHandle()->raw()); |
} |
- // Initialize cache of resolved names. |
- const intptr_t kInitialNameCacheSize = 64; |
- // The cache of resolved names in library scope is not serialized. |
- library.InitResolvedNamesCache(kInitialNameCacheSize); |
- library.Register(reader->thread()); |
+ // Initialize caches that are not serialized. |
+ library.StorePointer(&library.raw_ptr()->resolved_names_, Array::null()); |
library.StorePointer(&library.raw_ptr()->exported_names_, Array::null()); |
- // Initialize cache of loaded scripts. |
library.StorePointer(&library.raw_ptr()->loaded_scripts_, Array::null()); |
+ library.Register(reader->thread()); |
} |
return library.raw(); |
} |