Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 7977bd04d3da23c6ef018fd343906bd241a27e86..d39738215056c644a4507f21393fda7ec5bd28b1 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -744,9 +744,11 @@ void EnsureFeedbackVector(CompilationInfo* info) { |
if (!info->has_shared_info()) return; |
// If no type feedback vector exists, we create one now. At this point the |
- // AstNumbering pass has already run. Note that we should reuse any existing |
- // feedback vector rather than creating a new one. |
- if (info->shared_info()->feedback_vector()->is_empty()) { |
+ // AstNumbering pass has already run. Note the snapshot can contain outdated |
+ // vectors for a different configuration, hence we also recreate a new vector |
+ // when the function is not compiled (i.e. no code was serialized). |
+ if (info->shared_info()->feedback_vector()->is_empty() || |
+ !info->shared_info()->is_compiled()) { |
Handle<TypeFeedbackMetadata> feedback_metadata = TypeFeedbackMetadata::New( |
info->isolate(), info->literal()->feedback_vector_spec()); |
Handle<TypeFeedbackVector> feedback_vector = |