Update diff viewer to not use $.funcQueue.

Review Request #14102 — Created Aug. 13, 2024 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

This change introduces a new PromiseQueue, which replaces our old
$.funcQueue system. This works very similarly, where we can add a
bunch of items to the queue and then start it, potentially adding items
even as its running. The big difference is that the individual functions
don't need to care at all that they're running within the queue or ask
the queue to move on to the next item, because they're just promises or
async functions.

This also adds an abort signal, which is both handled internally in the
queue and also passed through to any functions that are included. This
fixes one of our long-standing bugs where rapid switching between
interdiff revisions or commit ranges would cause the displayed diffs to
be incorrect, showing files multiple times or diffs from the wrong
revisions.

  • Ran js-tests.
  • Loaded a ton of different diffs and switched rapidly between revisions
    and commit ranges. Saw that the correct files were always loaded and
    we never got weird duplicates.

Commits

Files