| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 273d3c5388909b9f0f5d2d5831d5ef14363065cc..76417d7c0edb8dc31ed18dcd66832c067fbfd562 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -1246,7 +1246,8 @@ MaybeHandle<Code> Compiler::GetOptimizedCode(Handle<JSFunction> function,
|
| PostponeInterruptsScope postpone(isolate);
|
|
|
| Handle<SharedFunctionInfo> shared = info->shared_info();
|
| - if (ScopeInfo::Empty(isolate) == shared->scope_info()) {
|
| + if (shared->code()->kind() != Code::FUNCTION ||
|
| + ScopeInfo::Empty(isolate) == shared->scope_info()) {
|
| // The function was never compiled. Compile it unoptimized first.
|
| CompilationInfoWithZone nested(function);
|
| nested.EnableDeoptimizationSupport();
|
|
|