From 279e86d6ea133a6b0248cd0e4e98297e6fffab1c Mon Sep 17 00:00:00 2001 From: "yurys@chromium.org" Date: Thu, 27 Mar 2014 14:19:51 +0000 Subject: [PATCH] NativeContext::map_cache reference should be strong in heap snapshots This change makes the reference itself a strong one. We will also need a special handling to make references from MapCache object to Map weak in the heap snapshots. The latter will be addressed separately. BUG=chromium:357060 LOG=Y R=alph@chromium.org, hpayer@chromium.org Review URL: https://codereview.chromium.org/214683002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20304 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap-snapshot-generator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/heap-snapshot-generator.cc b/src/heap-snapshot-generator.cc index 10e177d..332d0db 100644 --- a/src/heap-snapshot-generator.cc +++ b/src/heap-snapshot-generator.cc @@ -1278,7 +1278,8 @@ void V8HeapExplorer::ExtractContextReferences(int entry, Context* context) { } #define EXTRACT_CONTEXT_FIELD(index, type, name) \ - if (Context::index < Context::FIRST_WEAK_SLOT) { \ + if (Context::index < Context::FIRST_WEAK_SLOT || \ + Context::index == Context::MAP_CACHE_INDEX) { \ SetInternalReference(context, entry, #name, context->get(Context::index), \ FixedArray::OffsetOfElementAt(Context::index)); \ } else { \ -- 2.7.4