Index: src/parsing/parser.cc |
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc |
index 3e0637b70185d9a7d4328ef9f07447f619629c4b..e1e117549fb673c4944d52090a683a011f981ef8 100644 |
--- a/src/parsing/parser.cc |
+++ b/src/parsing/parser.cc |
@@ -747,6 +747,7 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) { |
ParsingModeScope mode(this, allow_lazy_ ? PARSE_LAZILY : PARSE_EAGERLY); |
ResetFunctionLiteralId(); |
DCHECK(info->function_literal_id() == FunctionLiteral::kIdTypeTopLevel || |
+ info->function_literal_id() == FunctionLiteral::kIdTypeEval || |
info->function_literal_id() == FunctionLiteral::kIdTypeInvalid); |
FunctionLiteral* result = NULL; |
@@ -834,7 +835,9 @@ FunctionLiteral* Parser::DoParseProgram(ParseInfo* info) { |
int parameter_count = parsing_module_ ? 1 : 0; |
result = factory()->NewScriptOrEvalFunctionLiteral( |
scope, body, function_state.materialized_literal_count(), |
- function_state.expected_property_count(), parameter_count); |
+ function_state.expected_property_count(), parameter_count, |
+ info->is_eval() ? FunctionLiteral::kIdTypeEval |
+ : FunctionLiteral::kIdTypeTopLevel); |
} |
} |