Skip to content

Commit 3ad8f26

Browse files
sethbrenithDevtools-frontend LUCI CQ
authored andcommitted
Omit zero-size search results in heap snapshot
The Summary pane in the heap snapshot viewer doesn't list any objects with zero self size. This change updates the ctrl-F search functionality to match. Bug: 392591004 Change-Id: I34e6ea9084ae3cbb860de6e702b771597d6434e7 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6200405 Commit-Queue: Ergün Erdoğmuş <[email protected]> Reviewed-by: Ergün Erdoğmuş <[email protected]> Reviewed-by: Simon Zünd <[email protected]>
1 parent efcab21 commit 3ad8f26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,6 +1118,11 @@ export abstract class HeapSnapshot {
11181118
if (filter && !filter(node)) {
11191119
continue;
11201120
}
1121+
if (node.selfSize() === 0) {
1122+
// Nodes with size zero are omitted in the data grid, so avoid returning
1123+
// search results that can't be navigated to.
1124+
continue;
1125+
}
11211126
const name = node.name();
11221127
if (name === node.rawName()) {
11231128
// If the string displayed to the user matches the raw name from the

0 commit comments

Comments
 (0)