Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index dc403d90b049390354bb824ba39e1a98a7a226dd..921bb8f7bcac572114d18bf7aeb1e55780cbdf15 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -12212,9 +12212,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_optimize_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() || |