Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: src/parser.cc

Issue 1350913005: Don't crash when preparsing destructured arguments (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Always add counts Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-4400.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index 8d180f06a643abb27dbc00ed45474ffc24974fa8..b67a349f8c0383b0449bc50c3bba6e1849f9908c 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4196,9 +4196,8 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
&expected_property_count, /*CHECK_OK*/ ok,
maybe_bookmark);
- if (formals.materialized_literals_count > 0) {
- materialized_literal_count += formals.materialized_literals_count;
- }
+ materialized_literal_count += formals.materialized_literals_count +
+ function_state.materialized_literal_count();
if (bookmark.HasBeenReset()) {
// Trigger eager (re-)parsing, just below this block.
« no previous file with comments | « no previous file | test/mjsunit/harmony/regress/regress-4400.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698