Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/core/src/lib/FileManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,11 @@ export class FileManager {
const dataSuffix = ['.heapsnapshot', '.json', '.png'];
const files = fs.readdirSync(curDataDir);
for (const file of files) {
inner: for (const suffix of dataSuffix) {
for (const suffix of dataSuffix) {
if (file.endsWith(suffix)) {
const filepath = path.join(curDataDir, file);
fs.unlinkSync(filepath);
break inner;
break;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/heap-analysis/src/PluginUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ function filterOutDominators(nodeList: IHeapNode[]): IHeapNode[] {
const visitedIds = new Set();
let curNode: Nullable<IHeapNode> = node;

inner: while (!visitedIds.has(curNode.id)) {
while (!visitedIds.has(curNode.id)) {
curNode = node.dominatorNode;
if (!curNode || curNode.id === node.id) {
break inner;
break;
}
// record the size of the children node in the candidate list
// and associate the children size with its dominator in the candidate list
Expand All @@ -103,7 +103,7 @@ function filterOutDominators(nodeList: IHeapNode[]): IHeapNode[] {
curNode.retainedSize,
childrenSize,
]);
break inner;
break;
}
visitedIds.add(curNode.id);
}
Expand Down