Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 90985eea7dfb4c3c6defb83c14a75541f1582b14..129ba3f64ed0b91e4276e4f770a1e0c6e7ad8971 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -9804,7 +9804,8 @@ void JSFunction::JSFunctionIterateBody(int object_size, ObjectVisitor* v) { |
void JSFunction::MarkForOptimization() { |
Isolate* isolate = GetIsolate(); |
DCHECK(!IsOptimized()); |
- DCHECK(shared()->allows_lazy_compilation() || IsOptimizable()); |
+ DCHECK(shared()->allows_lazy_compilation() || |
+ !shared()->optimization_disabled()); |
set_code_no_write_barrier( |
isolate->builtins()->builtin(Builtins::kCompileOptimized)); |
// No write barrier required, since the builtin is part of the root set. |
@@ -9828,7 +9829,8 @@ void JSFunction::AttemptConcurrentOptimization() { |
} |
DCHECK(!IsInOptimizationQueue()); |
DCHECK(!IsOptimized()); |
- DCHECK(shared()->allows_lazy_compilation() || IsOptimizable()); |
+ DCHECK(shared()->allows_lazy_compilation() || |
+ !shared()->optimization_disabled()); |
DCHECK(isolate->concurrent_recompilation_enabled()); |
if (FLAG_trace_concurrent_recompilation) { |
PrintF(" ** Marking "); |
@@ -9836,7 +9838,7 @@ void JSFunction::AttemptConcurrentOptimization() { |
PrintF(" for concurrent recompilation.\n"); |
} |
set_code_no_write_barrier( |
- GetIsolate()->builtins()->builtin(Builtins::kCompileOptimizedConcurrent)); |
+ isolate->builtins()->builtin(Builtins::kCompileOptimizedConcurrent)); |
// No write barrier required, since the builtin is part of the root set. |
} |