Commit 11aa116f authored by hpayer's avatar hpayer Committed by Commit bot

Visit code objects in native contexts only during full GCs.

BUG=

Review URL: https://codereview.chromium.org/887943002

Cr-Commit-Position: refs/heads/master@{#26351}
parent 6149d5ec
......@@ -303,8 +303,13 @@ struct WeakListVisitor<Context> {
// Process the three weak lists linked off the context.
DoWeakList<JSFunction>(heap, context, retainer,
Context::OPTIMIZED_FUNCTIONS_LIST);
DoWeakList<Code>(heap, context, retainer, Context::OPTIMIZED_CODE_LIST);
DoWeakList<Code>(heap, context, retainer, Context::DEOPTIMIZED_CODE_LIST);
// Code objects are always allocated in Code space, we do not have to visit
// them during scavenges.
if (heap->gc_state() == Heap::MARK_COMPACT) {
DoWeakList<Code>(heap, context, retainer, Context::OPTIMIZED_CODE_LIST);
DoWeakList<Code>(heap, context, retainer, Context::DEOPTIMIZED_CODE_LIST);
}
}
template <class T>
......
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