Skip to content

Commit

Permalink
VOM: remove linkToCohort/unweakable for KindHandle prototypes
Browse files Browse the repository at this point in the history
Now that `kindHandleToID` is a *strong* Map, KindHandles are held
strongly, from definition/reanimation time through to the end of the
incarnation. That means their prototype is no longer useful as a GC
sensor, and we don't need to use `linkToCohort` or `unweakable` to
prevent userspace from trying.
  • Loading branch information
warner committed Apr 12, 2023
1 parent 65a871f commit 5f9ff48
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/swingset-liveslots/src/virtualObjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,6 @@ export function makeVirtualObjectManager(
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error -- https://github.com/Agoric/agoric-sdk/issues/4620
// @ts-ignore cast
const kindHandle = Far('kind', {});
linkToCohort.set(Object.getPrototypeOf(kindHandle), kindHandle);
unweakable.add(Object.getPrototypeOf(kindHandle));
kindHandleToID.set(kindHandle, kindID);
kindIDToDescriptor.set(kindID, durableKindDescriptor);
registerValue(kindIDvref, kindHandle, false);
Expand Down

0 comments on commit 5f9ff48

Please sign in to comment.