Skip to content

Commit

Permalink
fix(swingset): tolerate policy='none' in queueToVatExport
Browse files Browse the repository at this point in the history
I added this mode (which doesn't even bother allocating a result promise) in
94c1688, but I didn't change
queueToVatExport to tolerate the lack of a result promise. This fixes the
issue. Unit tests that want to provoke an action but don't care about
observing the result (and want to minimize the number of additional cranks
being executed) should use `'none'`.
  • Loading branch information
warner committed Jun 11, 2021
1 parent 7848b16 commit 433efe2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/SwingSet/src/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,9 @@ export async function makeSwingsetController(
insistCapData(args);
const kref = kernel.addExport(vatID, exportID);
const kpid = kernel.queueToKref(kref, method, args, resultPolicy);
kernel.kpRegisterInterest(kpid);
if (kpid) {
kernel.kpRegisterInterest(kpid);
}
return kpid;
},
});
Expand Down

0 comments on commit 433efe2

Please sign in to comment.