Index: src/snapshot/partial-serializer.cc |
diff --git a/src/snapshot/partial-serializer.cc b/src/snapshot/partial-serializer.cc |
index e89f44f6e2c717ec5bf6cf526c63386af5f85f86..77221badaa2db7ba7b3dbaefc0a3472cde82dfd1 100644 |
--- a/src/snapshot/partial-serializer.cc |
+++ b/src/snapshot/partial-serializer.cc |
@@ -23,10 +23,12 @@ PartialSerializer::~PartialSerializer() { |
OutputStatistics("PartialSerializer"); |
} |
-void PartialSerializer::Serialize(Object** o) { |
+void PartialSerializer::Serialize(Object** o, bool include_global_proxy) { |
if ((*o)->IsContext()) { |
Context* context = Context::cast(*o); |
- reference_map()->AddAttachedReference(context->global_proxy()); |
+ if (!include_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 |