| Index: src/compiler.cc
|
| diff --git a/src/compiler.cc b/src/compiler.cc
|
| index 3b52aa2d3b925925b243fe13836641725c1d69d4..59d2fb8b1814f5c47d5dd0d888df7ee64e9478c8 100644
|
| --- a/src/compiler.cc
|
| +++ b/src/compiler.cc
|
| @@ -1238,7 +1238,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
|
| } else {
|
| // Explicitly disable optimization for eval code. We're not yet prepared
|
| // to handle eval-code in the optimizing compiler.
|
| - shared_info->DisableOptimization(kEval);
|
| + if (restriction != ONLY_SINGLE_FUNCTION_LITERAL) {
|
| + shared_info->DisableOptimization(kEval);
|
| + }
|
|
|
| // If caller is strict mode, the result must be in strict mode as well.
|
| DCHECK(strict_mode == SLOPPY || shared_info->strict_mode() == STRICT);
|
|
|