Index: src/runtime/runtime-test.cc |
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc |
index dfc7364c96ba34959aaadf0a7090230bddf5a36f..e5d84d11913bc2d02d05599c578a489f53cd7c1e 100644 |
--- a/src/runtime/runtime-test.cc |
+++ b/src/runtime/runtime-test.cc |
@@ -85,7 +85,8 @@ |
CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
// The following assertion was lifted from the DCHECK inside |
// JSFunction::MarkForOptimization(). |
- RUNTIME_ASSERT(function->shared()->allows_lazy_compilation()); |
+ RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() || |
+ function->IsOptimizable()); |
// If the function is already optimized, just return. |
if (function->IsOptimized()) return isolate->heap()->undefined_value(); |
@@ -128,7 +129,8 @@ |
// The following assertion was lifted from the DCHECK inside |
// JSFunction::MarkForOptimization(). |
- RUNTIME_ASSERT(function->shared()->allows_lazy_compilation()); |
+ RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() || |
+ function->IsOptimizable()); |
// If the function is already optimized, just return. |
if (function->IsOptimized()) return isolate->heap()->undefined_value(); |