Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add failing test of slotToVal memory leak for watchPromise
Liveslots has a bug (#10757) which leaks slotToVal entries when a tracked Promise is still being held in virtual data (e.g. a merely-virtual MapStore) at the time it becomes settled. This is triggered by `watchPromise` because of the order in which we attach two handlers: one which notices the resolution and is inhibited from deleting the slotToVal entry, and a second which removes the Promise from the (virtual) `promiseRegistrations` collection (thus enabling the deletion). For any watched Promise that is resolved, we leave a `slotToVal` entry (with an empty WeakRef) in RAM until the end of the incarnation. This commit adds a test.failing to demonstrate the presence of the bug. Each time we watch and then resolve a promise, the slotToVal table grows by one entry. refs #10756
- Loading branch information