Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index ef21f1f46f9e65ff227bdefb703fe4132101c59e..52451c6bbd046c008765f545925562e591766e8b 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -705,7 +705,10 @@ MUST_USE_RESULT static MaybeHandle<Code> GetCodeFromOptimizedCodeMap( |
} |
FixedArray* literals = shared->GetLiteralsFromOptimizedCodeMap(index); |
if (literals != NULL) function->set_literals(literals); |
- return Handle<Code>(shared->GetCodeFromOptimizedCodeMap(index)); |
+ Code* code = shared->GetCodeFromOptimizedCodeMap(index); |
+ DCHECK(!code->marked_for_deoptimization()); |
+ DCHECK(function->shared()->is_compiled()); |
+ return Handle<Code>(code); |
} |
} |
return MaybeHandle<Code>(); |