Index: src/heap.cc |
=================================================================== |
--- src/heap.cc (revision 5318) |
+++ src/heap.cc (working copy) |
@@ -571,6 +571,22 @@ |
} |
+class ClearThreadNormalizedMapCachesVisitor: public ThreadVisitor { |
+ virtual void VisitThread(ThreadLocalTop* top) { |
+ Context* context = top->context_; |
+ if (context == NULL) return; |
+ context->global()->global_context()->normalized_map_cache()->Clear(); |
+ } |
+}; |
+ |
+ |
+void Heap::ClearNormalizedMapCaches() { |
+ if (Bootstrapper::IsActive()) return; |
+ ClearThreadNormalizedMapCachesVisitor visitor; |
+ ThreadManager::IterateArchivedThreads(&visitor); |
+} |
+ |
+ |
#ifdef DEBUG |
enum PageWatermarkValidity { |
@@ -755,6 +771,8 @@ |
CompletelyClearInstanceofCache(); |
if (is_compacting) FlushNumberStringCache(); |
+ |
+ ClearNormalizedMapCaches(); |
} |