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

Unified Diff: src/objects.cc

Issue 917743004: Enable layout descriptor consistency checks in heap verification mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | src/objects-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 44057dbd9f51de787e62c18fe9bf196a36260a77..d0ee6d942fdc5c9f590c25b99c00da951a3fe576 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -6854,7 +6854,14 @@ Handle<Map> Map::CopyInstallDescriptors(
LayoutDescriptor::AppendIfFastOrUseFull(map, details,
full_layout_descriptor);
result->set_layout_descriptor(*layout_descriptor);
+#ifdef VERIFY_HEAP
+ // TODO(ishell): remove these checks from VERIFY_HEAP mode.
+ if (FLAG_verify_heap) {
+ CHECK(result->layout_descriptor()->IsConsistentWithMap(*result));
+ }
+#else
SLOW_DCHECK(result->layout_descriptor()->IsConsistentWithMap(*result));
+#endif
result->set_visitor_id(StaticVisitorBase::GetVisitorId(*result));
}
« no previous file with comments | « no previous file | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698