| Index: runtime/vm/dart_api_impl.cc
|
| ===================================================================
|
| --- runtime/vm/dart_api_impl.cc (revision 5063)
|
| +++ runtime/vm/dart_api_impl.cc (working copy)
|
| @@ -946,7 +946,10 @@
|
| return Api::NewError(msg);
|
| }
|
| const Type& type = Type::Handle(Type::NewNonParameterizedType(cls));
|
| - *value = instance.IsInstanceOf(type, TypeArguments::Handle());
|
| + Error& malformed_type_error = Error::Handle();
|
| + *value = instance.IsInstanceOf(
|
| + type, TypeArguments::Handle(), &malformed_type_error);
|
| + ASSERT(malformed_type_error.IsNull()); // Type was created here from a class.
|
| return Api::Success();
|
| }
|
|
|
| @@ -1420,7 +1423,11 @@
|
| Instance& instance = Instance::Handle();
|
| instance ^= obj.raw();
|
| const Type& type = Type::Handle(isolate->object_store()->list_interface());
|
| - if (instance.IsInstanceOf(type, TypeArguments::Handle())) {
|
| + Error& malformed_type_error = Error::Handle();
|
| + if (instance.IsInstanceOf(type,
|
| + TypeArguments::Handle(),
|
| + &malformed_type_error)) {
|
| + ASSERT(malformed_type_error.IsNull()); // Type is a raw List.
|
| return instance.raw();
|
| }
|
| }
|
|
|