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

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: 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..9b8973fd0cf71b35f0391adc598dfe6fef78e341 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -4200,6 +4200,11 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
materialized_literal_count += formals.materialized_literals_count;
}
+ if (function_state.materialized_literal_count() > 0) {
caitp (gmail) 2015/09/18 21:30:08 FunctionState's materialized_literal_count() never
caitp (gmail) 2015/09/18 21:38:16 In fact, this seems to be true for FormalParameter
adamk 2015/09/18 23:23:03 Sounds good, combined into a single statement.
+ materialized_literal_count +=
+ function_state.materialized_literal_count();
+ }
+
if (bookmark.HasBeenReset()) {
// Trigger eager (re-)parsing, just below this block.
is_lazily_parsed = false;
« 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