Index: runtime/vm/dart_api_impl.cc |
=================================================================== |
--- runtime/vm/dart_api_impl.cc (revision 25531) |
+++ runtime/vm/dart_api_impl.cc (working copy) |
@@ -2819,9 +2819,14 @@ |
Instance& new_object = Instance::Handle(isolate); |
if (constructor.IsRedirectingFactory()) { |
- Type& type = Type::Handle(constructor.RedirectionType()); |
+ ClassFinalizer::ResolveRedirectingFactory(cls, constructor); |
+ const Type& type = Type::Handle(constructor.RedirectionType()); |
+ constructor = constructor.RedirectionTarget(); |
+ if (constructor.IsNull()) { |
+ ASSERT(type.IsMalformed()); |
+ return Api::NewHandle(isolate, type.malformed_error()); |
+ } |
cls = type.type_class(); |
- constructor = constructor.RedirectionTarget(); |
} |
if (constructor.IsConstructor()) { |
// Create the new object. |