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 |