From 5f9ff48f7d162dc1564646f9d861f1396c6a1b0c Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Wed, 12 Apr 2023 11:20:15 -0700 Subject: [PATCH] VOM: remove linkToCohort/unweakable for KindHandle prototypes 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. --- packages/swingset-liveslots/src/virtualObjectManager.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/swingset-liveslots/src/virtualObjectManager.js b/packages/swingset-liveslots/src/virtualObjectManager.js index 170db46e019a..29d4c16c866c 100644 --- a/packages/swingset-liveslots/src/virtualObjectManager.js +++ b/packages/swingset-liveslots/src/virtualObjectManager.js @@ -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);