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

Unified Diff: runtime/bin/process.cc

Issue 9657001: Start using Dart_PropagateError in the runtime/bin directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
Index: runtime/bin/process.cc
===================================================================
--- runtime/bin/process.cc (revision 5191)
+++ runtime/bin/process.cc (working copy)
@@ -34,11 +34,15 @@
ASSERT(Dart_IsList(arguments));
intptr_t length = 0;
Dart_Handle result = Dart_ListLength(arguments, &length);
- ASSERT(!Dart_IsError(result));
+ if (Dart_IsError(result)) {
+ Dart_PropagateError(result);
+ }
char** string_args = new char*[length];
for (int i = 0; i < length; i++) {
Dart_Handle arg = Dart_ListGetAt(arguments, i);
- ASSERT(!Dart_IsError(arg));
+ if (Dart_IsError(arg)) {
Søren Gjesse 2012/03/08 21:18:46 Missing delete[] string_args.
turnidge 2012/03/08 22:19:26 Done.
+ Dart_PropagateError(arg);
+ }
// The Dart code verifies that the arguments implement the String
// interface. However, only builtin Strings are handled by
// GetStringValue.

Powered by Google App Engine
This is Rietveld 408576698