Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(875)

Unified Diff: runtime/vm/object.cc

Issue 2759393005: Cleanup change. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 2d3c83ab2eb83d883532866c406f0d7ba9cea8df..3fb20be568ffc4501e416eff984933b0a10b6e62 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -16720,9 +16720,8 @@ RawType* Type::NewNonParameterizedType(const Class& type_class) {
ASSERT(type_class.NumTypeArguments() == 0);
Type& type = Type::Handle(type_class.CanonicalType());
if (type.IsNull()) {
- const TypeArguments& no_type_arguments = TypeArguments::Handle();
- type ^= Type::New(Object::Handle(type_class.raw()), no_type_arguments,
- TokenPosition::kNoSource);
+ type ^= Type::New(Object::Handle(type_class.raw()),
+ Object::null_type_arguments(), TokenPosition::kNoSource);
type.SetIsFinalized();
type ^= type.Canonicalize();
}
@@ -17014,7 +17013,8 @@ bool Type::IsEquivalent(const Instance& other, TrailPtr trail) const {
return false;
}
#ifdef DEBUG
- if (from_index > 0) {
+ if ((from_index > 0) && !type_args.IsNull() &&
+ !other_type_args.IsNull()) {
// Verify that the type arguments of the super class match, since they
// depend solely on the type parameters that were just verified to
// match.
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698