Merge V8 5.2.361.47 DO NOT MERGE
https://chromium.googlesource.com/v8/v8/+/5.2.361.47
FPIIM-449
Change-Id: Ibec421b85a9b88cb3a432ada642e469fe7e78346
(cherry picked from commit bcf72ee8e3b26f1d0726869c7ddb3921c68b09a8)
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc
index 0f1f133..34defb4 100644
--- a/src/snapshot/partial-serializer.cc
+++ b/src/snapshot/partial-serializer.cc
@@ -14,7 +14,6 @@
SnapshotByteSink* sink)
: Serializer(isolate, sink),
startup_serializer_(startup_snapshot_serializer),
- global_object_(NULL),
next_partial_cache_index_(0) {
InitializeCodeAddressMap();
}
@@ -26,8 +25,7 @@
void PartialSerializer::Serialize(Object** o) {
if ((*o)->IsContext()) {
Context* context = Context::cast(*o);
- global_object_ = context->global_object();
- back_reference_map()->AddGlobalProxy(context->global_proxy());
+ reference_map()->AddAttachedReference(context->global_proxy());
// The bootstrap snapshot has a code-stub context. When serializing the
// partial snapshot, it is chained into the weak context list on the isolate
// and it's next context pointer may point to the code-stub context. Clear
@@ -74,7 +72,7 @@
// Pointers from the partial snapshot to the objects in the startup snapshot
// should go through the root array or through the partial snapshot cache.
// If this is not the case you may have to add something to the root array.
- DCHECK(!startup_serializer_->back_reference_map()->Lookup(obj).is_valid());
+ DCHECK(!startup_serializer_->reference_map()->Lookup(obj).is_valid());
// All the internalized strings that the partial snapshot needs should be
// either in the root table or in the partial snapshot cache.
DCHECK(!obj->IsInternalizedString());