Index: runtime/vm/dart_api_impl.cc |
=================================================================== |
--- runtime/vm/dart_api_impl.cc (revision 14985) |
+++ runtime/vm/dart_api_impl.cc (working copy) |
@@ -1760,10 +1760,12 @@ |
static RawInstance* GetListInstance(Isolate* isolate, const Object& obj) { |
if (obj.IsInstance()) { |
const Instance& instance = Instance::Cast(obj); |
- const Type& type = |
- Type::Handle(isolate, isolate->object_store()->list_interface()); |
+ const Class& obj_class = Class::Handle(isolate, obj.clazz()); |
+ const Class& list_class = |
+ Class::Handle(isolate, isolate->object_store()->list_class()); |
Error& malformed_type_error = Error::Handle(isolate); |
- if (instance.IsInstanceOf(type, |
+ if (obj_class.IsSubtypeOf(TypeArguments::Handle(isolate), |
+ list_class, |
TypeArguments::Handle(isolate), |
&malformed_type_error)) { |
ASSERT(malformed_type_error.IsNull()); // Type is a raw List. |