Index: runtime/vm/ast.cc |
=================================================================== |
--- runtime/vm/ast.cc (revision 3821) |
+++ runtime/vm/ast.cc (working copy) |
@@ -438,19 +438,17 @@ |
} |
GrowableArray<const Object*> arguments; |
const Array& kNoArgumentNames = Array::Handle(); |
- 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. |
+ const Instance& field_value = |
+ Instance::ZoneHandle(DartEntry::InvokeStatic(getter_func, |
+ arguments, |
+ kNoArgumentNames)); |
+ if (field_value.IsUnhandledException()) { |
return NULL; |
} |
- Instance& field_value = Instance::ZoneHandle(); |
- field_value ^= result.raw(); |
- return &field_value; |
+ if (!field_value.IsNull()) { |
+ return &field_value; |
+ } |
+ return NULL; |
} |
} // namespace dart |