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

Unified Diff: lib/object.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/isolate.cc ('k') | lib/regexp.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/object.cc
===================================================================
--- lib/object.cc (revision 16285)
+++ lib/object.cc (working copy)
@@ -24,11 +24,11 @@
GET_NON_NULL_NATIVE_ARGUMENT(Instance, func_args, arguments->NativeArgAt(3));
GET_NON_NULL_NATIVE_ARGUMENT(
Instance, func_named_args, arguments->NativeArgAt(4));
- GrowableArray<const Object*> dart_arguments(5);
- dart_arguments.Add(&instance);
- dart_arguments.Add(&member_name);
- dart_arguments.Add(&func_args);
- dart_arguments.Add(&func_named_args);
+ const Array& dart_arguments = Array::Handle(Array::New(5));
+ dart_arguments.SetAt(0, instance);
+ dart_arguments.SetAt(1, member_name);
+ dart_arguments.SetAt(2, func_args);
+ dart_arguments.SetAt(3, func_named_args);
if (is_method.value()) {
// Report if a function with same name (but different arguments) has been
@@ -48,7 +48,7 @@
for (int i = 1; i < total_num_parameters; i++) {
array.SetAt(i - 1, String::Handle(function.ParameterNameAt(i)));
}
- dart_arguments.Add(&array);
+ dart_arguments.SetAt(4, array);
}
}
Exceptions::ThrowByType(Exceptions::kNoSuchMethod, dart_arguments);
« no previous file with comments | « lib/isolate.cc ('k') | lib/regexp.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698