@agoric/base-zone has an implementation of isPassable that emulates the proper behavior using a try/catch to turn the thrown failure of passStyleOf into a return false;.
As of https://github.com/endojs/endo/pull/2042 , that is duplicated into @endo/pass-style , as a first step of migrating isPassable from @agoric/base-zone into @endo/pass-style. Once synced, we should also delete the one in @agoric/base-zone and change its users to import from @endo/pass-style instead.
passStyleOf should be rewritten into the form of our other checkFoo functions to take a Checker argument, so it can be used to create either an assertPassable that throws or an isPassable that never throws but rather returns false iff assertPassable would have thrown. passStyleOf would then be like assertPassable except that the success case also returns a string.
This will require a significant refactoring of passStyleOf, which is already performance critical, so we'll need to be careful.
@agoric/base-zone has an implementation of
isPassable
that emulates the proper behavior using a try/catch to turn the thrown failure ofpassStyleOf
into areturn false;
.As of https://github.com/endojs/endo/pull/2042 , that is duplicated into @endo/pass-style , as a first step of migrating
isPassable
from @agoric/base-zone into @endo/pass-style. Once synced, we should also delete the one in @agoric/base-zone and change its users to import from @endo/pass-style instead.passStyleOf
should be rewritten into the form of our othercheckFoo
functions to take aChecker
argument, so it can be used to create either anassertPassable
that throws or anisPassable
that never throws but rather returns false iffassertPassable
would have thrown.passStyleOf
would then be likeassertPassable
except that the success case also returns a string.This will require a significant refactoring of
passStyleOf
, which is already performance critical, so we'll need to be careful.