Index: src/runtime/runtime-test.cc |
diff --git a/src/runtime/runtime-test.cc b/src/runtime/runtime-test.cc |
index e115ba9e2477110208be70a60c197dba08bbb443..631bf0778b136c5de3b178dcfe8cb325c431a6f9 100644 |
--- a/src/runtime/runtime-test.cc |
+++ b/src/runtime/runtime-test.cc |
@@ -88,7 +88,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeFunctionOnNextCall) { |
// The following assertion was lifted from the DCHECK inside |
// JSFunction::MarkForOptimization(). |
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() || |
- function->IsOptimizable()); |
+ !function->shared()->optimization_disabled()); |
// If the function is already optimized, just return. |
if (function->IsOptimized()) return isolate->heap()->undefined_value(); |
@@ -132,7 +132,7 @@ RUNTIME_FUNCTION(Runtime_OptimizeOsr) { |
// The following assertion was lifted from the DCHECK inside |
// JSFunction::MarkForOptimization(). |
RUNTIME_ASSERT(function->shared()->allows_lazy_compilation() || |
- function->IsOptimizable()); |
+ !function->shared()->optimization_disabled()); |
// If the function is already optimized, just return. |
if (function->IsOptimized()) return isolate->heap()->undefined_value(); |