Skip to content

Commit

Permalink
chore(liveslots): expose registerDroppedCollection instead of raw FR
Browse files Browse the repository at this point in the history
  • Loading branch information
warner committed Apr 29, 2023
1 parent f357672 commit 3ea1a2c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/swingset-liveslots/src/virtualObjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export const makeVirtualObjectManager = (
actualWeakMaps.set(this, new WeakMap());
const vmap = new Map();
virtualObjectMaps.set(this, vmap);
vrm.droppedCollectionRegistry.register(this, {
vrm.registerDroppedCollection(this, {
collectionDeleter: voAwareWeakMapDeleter,
vmap,
});
Expand Down Expand Up @@ -496,7 +496,7 @@ export const makeVirtualObjectManager = (
const vset = new Set();
virtualObjectSets.set(this, vset);

vrm.droppedCollectionRegistry.register(this, {
vrm.registerDroppedCollection(this, {
collectionDeleter: voAwareWeakSetDeleter,
vset,
});
Expand Down
6 changes: 5 additions & 1 deletion packages/swingset-liveslots/src/virtualReferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ export function makeVirtualReferenceManager(
finalizeDroppedCollection,
);

function registerDroppedCollection(target, descriptor) {
droppedCollectionRegistry.register(target, descriptor);
}

/**
* Check if a virtual object is unreachable via virtual-data references.
*
Expand Down Expand Up @@ -683,7 +687,7 @@ export function makeVirtualReferenceManager(
}

return harden({
droppedCollectionRegistry,
registerDroppedCollection,
isDurable,
isDurableKind,
registerKind,
Expand Down

0 comments on commit 3ea1a2c

Please sign in to comment.