| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index e3a19a1e4ba988a0b19b00219e8ed50d83cb3a23..f2a872c2ecbc4d886063e48ad467ae281a898e9d 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -5,6 +5,7 @@
|
| #include "src/factory.h"
|
|
|
| #include "src/allocation-site-scopes.h"
|
| +#include "src/bootstrapper.h"
|
| #include "src/conversions.h"
|
| #include "src/isolate-inl.h"
|
| #include "src/macro-assembler.h"
|
| @@ -1377,7 +1378,8 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo(
|
| if (isolate()->use_crankshaft() &&
|
| FLAG_always_opt &&
|
| result->is_compiled() &&
|
| - !info->is_toplevel() &&
|
| + // TODO(mstarzinger): Extend to optimization of builtin code.
|
| + !isolate()->bootstrapper()->IsActive() &&
|
| info->allows_lazy_compilation() &&
|
| !info->optimization_disabled() &&
|
| !isolate()->DebuggerHasBreakPoints()) {
|
|
|