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

Unified Diff: src/objects-debug.cc

Issue 10827037: Extending map verification to also verify LastAdded/DescriptorArray consistency. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 8 years, 5 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 | « src/objects.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 3047326e2ab195789d438c7e7efc15802cdebbe7..311cab6d8bc1c2348c75274bfc3e64aecc63c4ae 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -302,6 +302,12 @@ void Map::MapVerify() {
instance_size() < HEAP->Capacity()));
VerifyHeapPointer(prototype());
VerifyHeapPointer(instance_descriptors());
+ if (instance_descriptors()->number_of_descriptors() == 0) {
+ ASSERT(LastAdded() == kNoneAdded);
+ } else {
+ ASSERT(instance_descriptors()->GetDetails(LastAdded()).index() ==
+ instance_descriptors()->number_of_descriptors());
+ }
SLOW_ASSERT(instance_descriptors()->IsSortedNoDuplicates());
if (HasTransitionArray()) {
SLOW_ASSERT(transitions()->IsSortedNoDuplicates());
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698