Commit 82b380d3 authored by vegorov@chromium.org's avatar vegorov@chromium.org

Clear normalized map caches in all global contexts not just in those reachable...

Clear normalized map caches in all global contexts not just in those reachable from ThreadLocalTops.

Issue reported by Mark Lam <mark.lam@palm.com> from Hewlett-Packard Development Company, LP.

Review URL: http://codereview.chromium.org/3828011

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e0ff35dd
......@@ -606,19 +606,14 @@ void Heap::ClearJSFunctionResultCaches() {
}
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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment