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

Unified Diff: src/heap-snapshot-generator-inl.h

Issue 112623005: Avoid SLOW_ASSERT when calling HeapGraphNode::GetChildrenCount (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comment addressed Created 7 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap-snapshot-generator-inl.h
diff --git a/src/heap-snapshot-generator-inl.h b/src/heap-snapshot-generator-inl.h
index 43002d2d2b170346dd124093783bd65c64682b5a..582de32c2bf12fa6c253f5f64286da3f286bfe4a 100644
--- a/src/heap-snapshot-generator-inl.h
+++ b/src/heap-snapshot-generator-inl.h
@@ -59,7 +59,10 @@ int HeapEntry::set_children_index(int index) {
HeapGraphEdge** HeapEntry::children_arr() {
ASSERT(children_index_ >= 0);
- return &snapshot_->children()[children_index_];
+ SLOW_ASSERT(children_index_ < snapshot_->children().length() ||
+ (children_index_ == snapshot_->children().length() &&
+ children_count_ == 0));
+ return &snapshot_->children().first() + children_index_;
alph 2013/12/18 15:15:51 first -> start
yurys 2013/12/18 15:19:27 List doesn't have start(), you may have confused i
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698