From 84bf373a03d9021af815d374705548badfa8eb65 Mon Sep 17 00:00:00 2001 From: "Mark S. Miller" Date: Sat, 5 Aug 2023 13:51:19 -0700 Subject: [PATCH] fix: review suggestion --- packages/swingset-liveslots/src/vatDataTypes.d.ts | 4 ++-- packages/swingset-liveslots/src/virtualObjectManager.js | 6 +++--- packages/vat-data/test/test-revoke-virtual.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/swingset-liveslots/src/vatDataTypes.d.ts b/packages/swingset-liveslots/src/vatDataTypes.d.ts index 70a48dbeb5d4..e4d206bada64 100644 --- a/packages/swingset-liveslots/src/vatDataTypes.d.ts +++ b/packages/swingset-liveslots/src/vatDataTypes.d.ts @@ -21,7 +21,7 @@ import type { Context, KitContext, Revoker, - GetRevoker, + ReceiveRevoker, } from '@endo/exo'; export type { MapStore, Pattern }; @@ -95,7 +95,7 @@ export type DefineKindOptions = { /** * If provided, it is called with a revoke function as an argument. */ - getRevoker?: GetRevoker; + receiveRevoker?: ReceiveRevoker; /** * Intended for internal use only. diff --git a/packages/swingset-liveslots/src/virtualObjectManager.js b/packages/swingset-liveslots/src/virtualObjectManager.js index d90801327523..24d4964a4dff 100644 --- a/packages/swingset-liveslots/src/virtualObjectManager.js +++ b/packages/swingset-liveslots/src/virtualObjectManager.js @@ -729,7 +729,7 @@ export const makeVirtualObjectManager = ( stateShape = undefined, thisfulMethods = false, interfaceGuard = undefined, - getRevoker = undefined, + receiveRevoker = undefined, } = options; const statePrototype = {}; // Not frozen yet @@ -1054,11 +1054,11 @@ export const makeVirtualObjectManager = ( return val; }; - if (getRevoker) { + if (receiveRevoker) { const makeRevoker = multifaceted ? makeContextFacetRevoker : makeContextRevoker; - getRevoker(makeRevoker(contextCache, getSlotForVal)); + receiveRevoker(makeRevoker(contextCache, getSlotForVal)); } return makeNewInstance; diff --git a/packages/vat-data/test/test-revoke-virtual.js b/packages/vat-data/test/test-revoke-virtual.js index d4b5f2d5e5ec..fa4553f7dff5 100644 --- a/packages/vat-data/test/test-revoke-virtual.js +++ b/packages/vat-data/test/test-revoke-virtual.js @@ -38,7 +38,7 @@ test('test revoke defineVirtualExoClass', t => { }, }, { - getRevoker(r) { + receiveRevoker(r) { revoke = r; }, }, @@ -77,7 +77,7 @@ test('test revoke defineVirtualExoClassKit', t => { }, }, { - getRevoker(r) { + receiveRevoker(r) { revoke = r; }, },