Skip to content

Commit

Permalink
chore: make refcount tag more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Oct 27, 2024
1 parent 14889f2 commit 3d6bf6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/SwingSet/src/kernel/state/vatKeeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ export function makeVatKeeper(
const key = `${vatID}.vatParameters`;
// increment-before-decrement to minimize spurious rc=0 checks
for (const kref of newVPCD.slots) {
incrementRefCount(kref, `${vatID}.vp`);
incrementRefCount(kref, `${vatID}.vatParameters`);
}
const old = kvStore.get(key) || '{"slots":[]}';
for (const kref of JSON.parse(old).slots) {
decrementRefCount(kref, `${vatID}.vp`);
decrementRefCount(kref, `${vatID}.vatParameters`);
}
kvStore.set(key, JSON.stringify(newVPCD));
}
Expand Down

0 comments on commit 3d6bf6e

Please sign in to comment.