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

Unified Diff: runtime/vm/ast.cc

Issue 9316071: Dart_PropagateError, take 2. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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 | « runtime/lib/isolate.cc ('k') | runtime/vm/bootstrap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/ast.cc
===================================================================
--- runtime/vm/ast.cc (revision 3862)
+++ runtime/vm/ast.cc (working copy)
@@ -438,17 +438,19 @@
}
GrowableArray<const Object*> arguments;
const Array& kNoArgumentNames = Array::Handle();
- const Instance& field_value =
- Instance::ZoneHandle(DartEntry::InvokeStatic(getter_func,
- arguments,
- kNoArgumentNames));
- if (field_value.IsUnhandledException()) {
+ const Object& result =
+ Object::Handle(DartEntry::InvokeStatic(getter_func,
+ arguments,
+ kNoArgumentNames));
+ if (result.IsError() || result.IsNull()) {
+ // TODO(turnidge): We could get better error messages by returning
+ // the Error object directly to the parser. This will involve
+ // replumbing all of the EvalConstExpr methods.
return NULL;
}
- if (!field_value.IsNull()) {
- return &field_value;
- }
- return NULL;
+ Instance& field_value = Instance::ZoneHandle();
+ field_value ^= result.raw();
+ return &field_value;
}
} // namespace dart
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698