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

Unified Diff: runtime/vm/object.cc

Issue 157053007: - Zap the allocated object when allocating uninitialized memory in debug. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 32504)
+++ runtime/vm/object.cc (working copy)
@@ -3993,6 +3993,12 @@
}
+void TypeArguments::set_type_at(intptr_t index,
+ const AbstractType& value) const {
+ StorePointer(TypeAddr(index), value.raw());
+}
+
+
void TypeArguments::SetTypeAt(intptr_t index, const AbstractType& value) const {
const AbstractType& type_arg = AbstractType::Handle(TypeAt(index));
if (type_arg.IsTypeRef()) {
@@ -4000,7 +4006,7 @@
TypeRef::Cast(type_arg).set_type(value);
}
} else {
- StorePointer(TypeAddr(index), value.raw());
+ set_type_at(index, value);
}
}
@@ -4206,7 +4212,7 @@
instantiator_type_arguments.IsCanonical());
// Lookup instantiator and, if found, return paired instantiated result.
Array& prior_instantiations = Array::Handle(instantiations());
- ASSERT(!prior_instantiations.IsNull());
+ ASSERT(!prior_instantiations.IsNull() && prior_instantiations.IsArray());
intptr_t length = prior_instantiations.Length();
intptr_t index = 0;
while (index < length) {
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | runtime/vm/snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698