Revision: 5654
Author: [email protected]
Date: Tue Oct 19 01:14:41 2010
Log: Clear normalized map caches in all global contexts not just in those
reachable from ThreadLocalTops.
Issue reported by Mark Lam <[email protected]> from Hewlett-Packard
Development Company, LP.
Review URL: http://codereview.chromium.org/3828011
http://code.google.com/p/v8/source/detail?r=5654
Modified:
/branches/bleeding_edge/src/heap.cc
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon Oct 18 07:59:03 2010
+++ /branches/bleeding_edge/src/heap.cc Tue Oct 19 01:14:41 2010
@@ -606,19 +606,14 @@
}
-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);
+
+ Object* context = global_contexts_list_;
+ while (!context->IsUndefined()) {
+ Context::cast(context)->normalized_map_cache()->Clear();
+ context = Context::cast(context)->get(Context::NEXT_CONTEXT_LINK);
+ }
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev