Skip to content
Merged
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
5 changes: 4 additions & 1 deletion src/profile-logic/call-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@ export function computeCallTreeCountsAndSummary(
let rootTotalSummary = 0;
let rootCount = 0;

// Workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=1858310
const abs = Math.abs;
Comment thread
mstange marked this conversation as resolved.

// We loop the call node table in reverse, so that we find the children
// before their parents, and the total is known at the time we reach a
// node.
Expand All @@ -538,7 +541,7 @@ export function computeCallTreeCountsAndSummary(
callNodeIndex--
) {
callNodeTotalSummary[callNodeIndex] += callNodeLeaf[callNodeIndex];
rootTotalSummary += Math.abs(callNodeLeaf[callNodeIndex]);
rootTotalSummary += abs(callNodeLeaf[callNodeIndex]);
const hasChildren = callNodeChildCount[callNodeIndex] !== 0;
const hasTotalValue = callNodeTotalSummary[callNodeIndex] !== 0;

Expand Down
Loading