Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 7c46f800e48df19b780a8119ad70cd3f182e45b0..9e8b06c6fc467e8ca7668d039df96b29a9f9c4eb 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12211,6 +12211,10 @@ void JSFunction::MarkForOptimization() { |
void JSFunction::AttemptConcurrentOptimization() { |
+ // Mark the shared function for optimization regardless of whether the |
+ // optimization is concurrent or not. |
+ shared()->set_was_marked_for_optimization(true); |
+ |
Isolate* isolate = GetIsolate(); |
if (!isolate->concurrent_recompilation_enabled() || |
isolate->bootstrapper()->IsActive()) { |
@@ -12227,6 +12231,7 @@ void JSFunction::AttemptConcurrentOptimization() { |
ShortPrint(); |
PrintF(" for concurrent recompilation.\n"); |
} |
+ |
set_code_no_write_barrier( |
isolate->builtins()->builtin(Builtins::kCompileOptimizedConcurrent)); |
// No write barrier required, since the builtin is part of the root set. |