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

Unified Diff: src/serialize.h

Issue 846023002: Update references to global object after deserializing context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 11 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/bootstrapper.cc ('k') | src/serialize.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index 5dc73745baab1d08cea857372b94a5bc8e7644a5..499acde1a395895252d258048f822b96c822c578 100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -518,12 +518,12 @@ class Deserializer: public SerializerDeserializer {
// Deserialize the snapshot into an empty heap.
void Deserialize(Isolate* isolate);
- enum OnOOM { FATAL_ON_OOM, NULL_ON_OOM };
-
// Deserialize a single object and the objects reachable from it.
// We may want to abort gracefully even if deserialization fails.
- void DeserializePartial(Isolate* isolate, Object** root,
- OnOOM on_oom = FATAL_ON_OOM);
+ MaybeHandle<Object> DeserializePartial(
+ Isolate* isolate, Handle<FixedArray>* outdated_contexts_out);
+
+ MaybeHandle<SharedFunctionInfo> DeserializeCode(Isolate* isolate);
void FlushICacheForNewCodeObjects();
@@ -542,6 +542,8 @@ class Deserializer: public SerializerDeserializer {
UNREACHABLE();
}
+ void Initialize(Isolate* isolate);
+
void DecodeReservation(Vector<const SerializedData::Reservation> res);
bool ReserveSpace();
@@ -738,11 +740,12 @@ class Serializer : public SerializerDeserializer {
class PartialSerializer : public Serializer {
public:
- PartialSerializer(Isolate* isolate,
- Serializer* startup_snapshot_serializer,
+ PartialSerializer(Isolate* isolate, Serializer* startup_snapshot_serializer,
SnapshotByteSink* sink)
- : Serializer(isolate, sink),
- startup_serializer_(startup_snapshot_serializer) {
+ : Serializer(isolate, sink),
+ startup_serializer_(startup_snapshot_serializer),
+ outdated_contexts_(0),
+ global_object_(NULL) {
InitializeCodeAddressMap();
}
@@ -766,8 +769,11 @@ class PartialSerializer : public Serializer {
startup_serializer_->isolate()->heap()->fixed_cow_array_map();
}
+ void SerializeOutdatedContextsAsFixedArray();
Serializer* startup_serializer_;
+ List<BackReference> outdated_contexts_;
+ Object* global_object_;
DISALLOW_COPY_AND_ASSIGN(PartialSerializer);
};
« no previous file with comments | « src/bootstrapper.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698