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

Issue 112623005: Avoid SLOW_ASSERT when calling HeapGraphNode::GetChildrenCount (Closed)

Created:
7 years ago by yurys
Modified:
7 years ago
Reviewers:
ulan, alph, loislo
CC:
v8-dev
Visibility:
Public.

Description

Avoid SLOW_ASSERT when calling HeapGraphNode::GetChildrenCount It may occur that GetChildrenCount is called on the node which has no children and stored last in the internal nodes array. In that case HeapEntry::children_arr() would fail when taking address of the element at index children_index_ which is past the last element in the children's array. BUG=None LOG=N R=alph@chromium.org, ulan@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18378

Patch Set 1 #

Total comments: 2

Patch Set 2 : Comment addressed #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M src/heap-snapshot-generator-inl.h View 1 1 chunk +4 lines, -1 line 2 comments Download

Messages

Total messages: 7 (0 generated)
yurys
This change fixes test failure found in https://codereview.chromium.org/117483002/
7 years ago (2013-12-18 13:39:55 UTC) #1
ulan
LGTM, thank you for fixing it!
7 years ago (2013-12-18 13:42:50 UTC) #2
alph
lgtm https://codereview.chromium.org/112623005/diff/1/src/heap-snapshot-generator-inl.h File src/heap-snapshot-generator-inl.h (right): https://codereview.chromium.org/112623005/diff/1/src/heap-snapshot-generator-inl.h#newcode62 src/heap-snapshot-generator-inl.h:62: SLOW_ASSERT(children_index_ <= snapshot_->children().length()); SLOW_ASSERT(children_index_ < snapshot_->children().length() || children_index_ ...
7 years ago (2013-12-18 13:46:58 UTC) #3
yurys
https://codereview.chromium.org/112623005/diff/1/src/heap-snapshot-generator-inl.h File src/heap-snapshot-generator-inl.h (right): https://codereview.chromium.org/112623005/diff/1/src/heap-snapshot-generator-inl.h#newcode62 src/heap-snapshot-generator-inl.h:62: SLOW_ASSERT(children_index_ <= snapshot_->children().length()); On 2013/12/18 13:46:59, alph wrote: > ...
7 years ago (2013-12-18 15:07:15 UTC) #4
alph
https://codereview.chromium.org/112623005/diff/20001/src/heap-snapshot-generator-inl.h File src/heap-snapshot-generator-inl.h (right): https://codereview.chromium.org/112623005/diff/20001/src/heap-snapshot-generator-inl.h#newcode65 src/heap-snapshot-generator-inl.h:65: return &snapshot_->children().first() + children_index_; first -> start
7 years ago (2013-12-18 15:15:50 UTC) #5
yurys
https://codereview.chromium.org/112623005/diff/20001/src/heap-snapshot-generator-inl.h File src/heap-snapshot-generator-inl.h (right): https://codereview.chromium.org/112623005/diff/20001/src/heap-snapshot-generator-inl.h#newcode65 src/heap-snapshot-generator-inl.h:65: return &snapshot_->children().first() + children_index_; On 2013/12/18 15:15:51, alph wrote: ...
7 years ago (2013-12-18 15:19:27 UTC) #6
yurys
7 years ago (2013-12-20 07:33:30 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 manually as r18378 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698