Skip to content

Commit

Permalink
fix: review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Aug 6, 2023
1 parent d62b0ab commit 84bf373
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/swingset-liveslots/src/vatDataTypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type {
Context,
KitContext,
Revoker,
GetRevoker,
ReceiveRevoker,
} from '@endo/exo';

export type { MapStore, Pattern };
Expand Down Expand Up @@ -95,7 +95,7 @@ export type DefineKindOptions<C> = {
/**
* If provided, it is called with a revoke function as an argument.
*/
getRevoker?: GetRevoker;
receiveRevoker?: ReceiveRevoker;

/**
* Intended for internal use only.
Expand Down
6 changes: 3 additions & 3 deletions packages/swingset-liveslots/src/virtualObjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export const makeVirtualObjectManager = (
stateShape = undefined,
thisfulMethods = false,
interfaceGuard = undefined,
getRevoker = undefined,
receiveRevoker = undefined,
} = options;

const statePrototype = {}; // Not frozen yet
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions packages/vat-data/test/test-revoke-virtual.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ test('test revoke defineVirtualExoClass', t => {
},
},
{
getRevoker(r) {
receiveRevoker(r) {
revoke = r;
},
},
Expand Down Expand Up @@ -77,7 +77,7 @@ test('test revoke defineVirtualExoClassKit', t => {
},
},
{
getRevoker(r) {
receiveRevoker(r) {
revoke = r;
},
},
Expand Down

0 comments on commit 84bf373

Please sign in to comment.