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

Unified Diff: lib/integers.cc

Issue 11639007: Cleanup the exceptions create code to use Arrays instead GrowableArrays so (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « lib/growable_array.cc ('k') | lib/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/integers.cc
===================================================================
--- lib/integers.cc (revision 16285)
+++ lib/integers.cc (working copy)
@@ -202,8 +202,8 @@
return Integer::New(temp);
}
- GrowableArray<const Object*> args;
- args.Add(&value);
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, value);
Exceptions::ThrowByType(Exceptions::kFormat, args);
return Object::null();
}
@@ -213,8 +213,8 @@
const Integer& value,
const Smi& amount) {
if (amount.Value() < 0) {
- GrowableArray<const Object*> args;
- args.Add(&amount);
+ const Array& args = Array::Handle(Array::New(1));
+ args.SetAt(0, amount);
Exceptions::ThrowByType(Exceptions::kArgument, args);
}
if (value.IsSmi()) {
« no previous file with comments | « lib/growable_array.cc ('k') | lib/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698