Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 9e8b06c6fc467e8ca7668d039df96b29a9f9c4eb..00f393053e1aa80a769fef2f5943764d4a79211d 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12211,9 +12211,11 @@ 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); |
+ if (FLAG_mark_shared_functions) { |
+ // 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() || |