Skip to content

Commit 7cd6f77

Browse files
Lightning00Bladedevtools-frontend-scoped@luci-project-accounts.iam.gserviceaccount.com
authored andcommitted
Small style fixes
Small stylistic changes that don't affect runtime. Bug: none Change-Id: I2e846148be13bd45bed8ae85ae53dd348da4c2d6 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/7759595 Auto-Submit: Nikolay Vitkov <nvitkov@chromium.org> Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org> Reviewed-by: Samiya Caur <samiyac@chromium.org>
1 parent 6c3a98c commit 7cd6f77

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

front_end/panels/profiler/HeapSnapshotDataGrids.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class HeapSnapshotSortableDataGrid extends Common.ObjectWrapper
300300
let field1 = nodeA[sortFields.fieldName1];
301301
// @ts-expect-error
302302
let field2 = nodeB[sortFields.fieldName1];
303-
let result: number|(0 | 1 | -1) = field1 < field2 ? -1 : (field1 > field2 ? 1 : 0);
303+
let result: number = field1 < field2 ? -1 : (field1 > field2 ? 1 : 0);
304304
if (!sortFields.ascending1) {
305305
result = -result;
306306
}

front_end/panels/profiler/HeapSnapshotGridNodes.ts

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -136,31 +136,23 @@ export class HeapSnapshotGridNode extends
136136
Common.ObjectWrapper.eventMixin<HeapSnapshotGridNode.EventTypes, typeof HeapSnapshotGridNodeBase>(
137137
HeapSnapshotGridNodeBase) {
138138
dataGridInternal: HeapSnapshotSortableDataGrid;
139-
instanceCount: number;
140-
readonly savedChildren: Map<number, HeapSnapshotGridNode>;
139+
instanceCount = 0;
140+
readonly savedChildren = new Map<number, HeapSnapshotGridNode>();
141+
/**
142+
* List of position ranges for all visible nodes: [startPos1, endPos1),...,[startPosN, endPosN)
143+
* Position is an item position in the provider.
144+
*/
141145
retrievedChildrenRanges: Array<{
142146
from: number,
143147
to: number,
144-
}>;
145-
providerObject: HeapSnapshotModel.ChildrenProvider.ChildrenProvider|null;
146-
reachableFromWindow: boolean;
148+
}> = [];
149+
providerObject: HeapSnapshotModel.ChildrenProvider.ChildrenProvider|null = null;
150+
reachableFromWindow = false;
147151
populated?: boolean;
148152

149153
constructor(tree: HeapSnapshotSortableDataGrid, hasChildren: boolean) {
150154
super(null, hasChildren);
151155
this.dataGridInternal = tree;
152-
this.instanceCount = 0;
153-
154-
this.savedChildren = new Map();
155-
156-
/**
157-
* List of position ranges for all visible nodes: [startPos1, endPos1),...,[startPosN, endPosN)
158-
* Position is an item position in the provider.
159-
*/
160-
this.retrievedChildrenRanges = [];
161-
162-
this.providerObject = null;
163-
this.reachableFromWindow = false;
164156
}
165157

166158
get name(): string|undefined {

0 commit comments

Comments
 (0)