Skip to content

Commit

Permalink
BUGFIX: deliverOneMessage() accidentally skipped insist() msgs.
Browse files Browse the repository at this point in the history
I don't see how to write a test for this. Suggestions?
  • Loading branch information
Chris-Hibbert committed Jan 13, 2020
1 parent 1d786a0 commit 68f3eda
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/SwingSet/src/kernel/vatManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,10 @@ export default function makeVatManager(
async function deliverOneMessage(target, msg) {
insistMessage(msg);
const targetSlot = mapKernelSlotToVatSlot(target);
if (targetSlot.type === 'object') {
const { type } = parseVatSlot(targetSlot);
if (type === 'object') {
insist(parseVatSlot(targetSlot).allocatedByVat, `deliver() to wrong vat`);
} else if (targetSlot.type === 'promise') {
} else if (type === 'promise') {
const p = kernelKeeper.getKernelPromise(target);
insist(p.decider === vatID, `wrong decider`);
}
Expand Down

0 comments on commit 68f3eda

Please sign in to comment.