Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 89864e049ba49fdad495cd2172abf3a347e1fc19..66b950bcb918d220702425e8101869aaf1ffc73a 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -142,13 +142,11 @@ void CompilationInfo::Initialize(Isolate* isolate, |
} |
set_bailout_reason(kUnknown); |
- if (!shared_info().is_null()) { |
- FixedArray* info_feedback_vector = shared_info()->feedback_vector(); |
- if (info_feedback_vector->length() > 0) { |
- // We should initialize the CompilationInfo feedback vector from the |
- // passed in shared info, rather than creating a new one. |
- feedback_vector_ = Handle<FixedArray>(info_feedback_vector, isolate); |
- } |
+ if (!shared_info().is_null() && shared_info()->is_compiled()) { |
+ // We should initialize the CompilationInfo feedback vector from the |
+ // passed in shared info, rather than creating a new one. |
+ feedback_vector_ = Handle<FixedArray>(shared_info()->feedback_vector(), |
+ isolate); |
} |
} |