Skip to content

Commit

Permalink
Bug 1815460 - [devtools] Netmonitor waterfall sort should fallback to…
Browse files Browse the repository at this point in the history
… resource ids r=ochameau,bomsy,devtools-reviewers

resource ids are channel ids and should be incrementally generated. The current id is actually an actor id, meaning it is a string which will lead to incorrect comparisons (eg "Actor10" will be considered "lower" than "Actor2") and also fully depends on the order in which we create the actors.

On some platform / configurations we get identical timestamps for batches of requests, so the fallback mechanism should be reliable

Differential Revision: https://phabricator.services.mozilla.com/D169361
  • Loading branch information
juliandescottes committed Mar 24, 2023
1 parent d21b33c commit dfc32d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devtools/client/netmonitor/src/utils/sort-predicates.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function compareValues(first, second) {

function waterfall(first, second) {
const result = compareValues(first.startedMs, second.startedMs);
return result || compareValues(first.id, second.id);
return result || compareValues(first.resourceId, second.resourceId);
}

function priority(first, second) {
Expand Down

0 comments on commit dfc32d2

Please sign in to comment.