Update diff viewer to not use $.funcQueue.
Review Request #14102 — Created Aug. 13, 2024 and updated
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:
-
Summary ID 74ef367f5d16ddc136f46474dd89a4de85f8f098 aa0377d95f091422df73bf0e45301033651a4472 - Diff:
-
Revision 2 (+602 -36)