Index: runtime/vm/class_finalizer.cc |
=================================================================== |
--- runtime/vm/class_finalizer.cc (revision 11005) |
+++ runtime/vm/class_finalizer.cc (working copy) |
@@ -1122,6 +1122,9 @@ |
name.ToCString()); |
} |
cls.Finalize(); |
+ // Signature classes extend Object. No need to add this class to the direct |
+ // subclasses of Object. |
+ ASSERT(super_type.IsNull() || super_type.IsObjectType()); |
return; |
} |
// Finalize factory class, if any. |
@@ -1168,6 +1171,12 @@ |
cls_name.ToCString(), lib_name.ToCString()); |
} |
} |
+ // Add this class to the direct subclasses of the superclass, unless the |
+ // superclass is Object. |
+ if (!super_type.IsNull() && !super_type.IsObjectType()) { |
+ ASSERT(!super_class.IsNull()); |
+ super_class.AddDirectSubclass(cls); |
+ } |
} |