Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index 3b3d0d29eadf6ccfd79555e5aa0e1ca269749533..6ea782760fa71e47aabb2420b00e233361605a09 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1346,10 +1346,8 @@ Handle<JSObject> Factory::NewFunctionPrototype(Handle<JSFunction> function) { |
} |
-static bool ShouldOptimizeNewClosure(Isolate* isolate, |
- Handle<SharedFunctionInfo> info) { |
- return !info->is_toplevel() && info->is_compiled() && |
- info->allows_lazy_compilation(); |
+static bool ShouldOptimizeNewClosure(Handle<SharedFunctionInfo> info) { |
+ return !info->is_toplevel() && info->allows_lazy_compilation(); |
} |
@@ -1384,7 +1382,7 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
return result; |
} |
- if (FLAG_always_opt && ShouldOptimizeNewClosure(isolate(), info)) { |
+ if (FLAG_always_opt && ShouldOptimizeNewClosure(info)) { |
result->MarkForOptimization(); |
} |
return result; |