Skip to content

Commit

Permalink
fix: don't swallow errors that happen during delivery into a vat
Browse files Browse the repository at this point in the history
  • Loading branch information
FUDCo committed Jan 22, 2022
1 parent f43e88e commit e39ce77
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/SwingSet/src/kernel/liveSlots.js
Original file line number Diff line number Diff line change
Expand Up @@ -1221,15 +1221,11 @@ function build(
// Start user code running, record any internal liveslots errors. We do
// *not* directly wait for the userspace function to complete, nor for
// any promise it returns to fire.
Promise.resolve(delivery)
.then(unmeteredDispatch)
.catch(err =>
console.log(`liveslots error ${err} during delivery ${delivery}`),
);
const p = Promise.resolve(delivery).then(unmeteredDispatch);

// Instead, we wait for userspace to become idle by draining the promise
// queue.
return gcTools.waitUntilQuiescent();
return gcTools.waitUntilQuiescent().then(() => p);
}
}
harden(dispatch);
Expand Down

0 comments on commit e39ce77

Please sign in to comment.