Commit 84f0a33c authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Serializer forces flushing of optimized code map.

This makes sure that the GC fully flushes the optimized code map when
the serializer is preparing a snapshot. Otherwise closures and contexts
could end up in the startup snapshot.

R=hpayer@chromium.org
TEST=cctest/test-serialize/SerializeInternalReference

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

Cr-Commit-Position: refs/heads/master@{#29461}
parent 0a5b6ad7
......@@ -409,7 +409,8 @@ void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
if (FLAG_cleanup_code_caches_at_gc) {
shared->ClearTypeFeedbackInfoAtGCTime();
}
if (FLAG_flush_optimized_code_cache &&
if ((FLAG_flush_optimized_code_cache ||
heap->isolate()->serializer_enabled()) &&
!shared->optimized_code_map()->IsSmi()) {
// Always flush the optimized code map if requested by flag.
shared->ClearOptimizedCodeMap();
......
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