Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prevent vats from using send() to call themselves
Vats normally use send() to queue messages for things they've imported (either the exports of other vats, or kernel promises which hopefully resolve to an export of some other vat). But if a Vat uses send() on one if its own exports, that will queue a message which will be delivered back to themselves later. There's currently no good reason to do this, and it probably indicates the vat got confused about what it was passing to send(). So for now, detect this and throw an exception. This might change when we add escalators later, but even then I can't currently imagine a scenario in which we want to defer execution that isn't more efficient to express with a local `Promise.resolve`. closes Agoric#43
- Loading branch information