Skip to content

Commit

Permalink
fix: warner review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
FUDCo committed Apr 5, 2022
1 parent dbb1f0e commit 5065fa9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/SwingSet/src/liveslots/virtualObjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ export function makeVirtualObjectManager(
}
}

function copyMethods(behaviorTemplate) {
function copyMethods(behavior) {
const obj = {};
for (const [name, func] of Object.entries(behaviorTemplate)) {
for (const [name, func] of Object.entries(behavior)) {
assert.typeof(func, 'function');
obj[name] = func;
}
Expand Down Expand Up @@ -642,6 +642,7 @@ export function makeVirtualObjectManager(
unweakable.add(state);
if (facetNames === null) {
const context = { state };
// `context` does not need a linkToCohort because it's held by the bound methods
unweakable.add(context);
context.self = bindMethods(context, behaviorTemplate);
toHold = Far(tag, context.self);
Expand Down

0 comments on commit 5065fa9

Please sign in to comment.