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

Unified Diff: runtime/vm/parser.cc

Issue 430873002: Fix usage of empty array while parsing array literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ebabf104d6c6b1823544064e9abd8351bb51ec34..78126451610b4348371faf27aedc5a10f8cd6b88 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -10028,10 +10028,8 @@ AstNode* Parser::ParseListLiteral(intptr_t type_pos,
ArgumentListNode* factory_param = new(I) ArgumentListNode(
literal_pos);
if (element_list.length() == 0) {
- // TODO(srdjan): Use Object::empty_array once issue 9871 has been fixed.
- Array& empty_array = Array::ZoneHandle(I, Object::empty_array().raw());
LiteralNode* empty_array_literal =
- new(I) LiteralNode(TokenPos(), empty_array);
+ new(I) LiteralNode(TokenPos(), Object::empty_array());
factory_param->Add(empty_array_literal);
} else {
ArrayNode* list = new(I) ArrayNode(TokenPos(), type, element_list);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698