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

Unified Diff: src/snapshot/deserializer.h

Issue 1992723002: [serializer] prepare attached references for general use. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
Index: src/snapshot/deserializer.h
diff --git a/src/snapshot/deserializer.h b/src/snapshot/deserializer.h
index 58c481cc7983d40c1907d7eaa9a3efbce346d36d..08b34441f82e35a4e214352464f1860a75df0083 100644
--- a/src/snapshot/deserializer.h
+++ b/src/snapshot/deserializer.h
@@ -53,10 +53,10 @@ class Deserializer : public SerializerDeserializer {
// Deserialize a shared function info. Fail gracefully.
MaybeHandle<SharedFunctionInfo> DeserializeCode(Isolate* isolate);
- // Pass a vector of externally-provided objects referenced by the snapshot.
- // The ownership to its backing store is handed over as well.
- void SetAttachedObjects(Vector<Handle<Object> > attached_objects) {
- attached_objects_ = attached_objects;
+ // Add an object to back an attached reference. The order to add objects must
+ // mirror the order they are added in the serializer.
+ void AddAttachedObject(Handle<HeapObject> attached_object) {
+ attached_objects_.Add(attached_object);
}
private:
@@ -117,7 +117,7 @@ class Deserializer : public SerializerDeserializer {
Isolate* isolate_;
// Objects from the attached object descriptions in the serialized user code.
- Vector<Handle<Object> > attached_objects_;
+ List<Handle<HeapObject> > attached_objects_;
SnapshotByteSource source_;
uint32_t magic_number_;

Powered by Google App Engine
This is Rietveld 408576698