Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(296)

Unified Diff: src/snapshot/serializer-common.cc

Issue 2801073006: Decouple root visitors from object visitors. (Closed)
Patch Set: rebase Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot/serializer-common.h ('k') | src/snapshot/startup-serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/snapshot/serializer-common.cc
diff --git a/src/snapshot/serializer-common.cc b/src/snapshot/serializer-common.cc
index 89aabdf263b3e70534a3c248ab9002134edbb88d..05a18ab727cc5c91445a98a8b9880d2bf81d515b 100644
--- a/src/snapshot/serializer-common.cc
+++ b/src/snapshot/serializer-common.cc
@@ -67,14 +67,14 @@ void SerializedData::AllocateData(int size) {
// - during normal GC to keep its content alive.
// - not during serialization. The partial serializer adds to it explicitly.
DISABLE_CFI_PERF
-void SerializerDeserializer::Iterate(Isolate* isolate, ObjectVisitor* visitor) {
+void SerializerDeserializer::Iterate(Isolate* isolate, RootVisitor* visitor) {
List<Object*>* cache = isolate->partial_snapshot_cache();
for (int i = 0;; ++i) {
// Extend the array ready to get a value when deserializing.
if (cache->length() <= i) cache->Add(Smi::kZero);
// During deserialization, the visitor populates the partial snapshot cache
// and eventually terminates the cache with undefined.
- visitor->VisitPointer(&cache->at(i));
+ visitor->VisitRootPointer(Root::kPartialSnapshotCache, &cache->at(i));
if (cache->at(i)->IsUndefined(isolate)) break;
}
}
« no previous file with comments | « src/snapshot/serializer-common.h ('k') | src/snapshot/startup-serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698