[cap-talk] Lua, Javascript, and the Object Capability Model
James Graves
ansible at xnet.com
Thu Jul 30 13:18:50 EDT 2009
Matej Kosik wrote:
> Let me rephrase the question (concerning connectivity by introduction)
> more clearly.
>
> Suppose that there are two mutually suspicious subsystems (A and B).
>
> A has the authority to draw on the entire screen.
>
> A wants to let B render itself to a rectangular window. Can A give B
> some capability that can be then used by B to render itself into that
> rectangular area?
>
> (suppose that neither A nor B can manipulate each other's global tables
> defining meanings of names of procedures)
>
Well, if A and B are in the same Lua thread then it is certainly
possible to pass a reference to a function from A to B. Either as an
argument in a function call, or as a return value, or stored in a data
structure that A and B share.
If you want to go between threads, that's going to be analogous to
talking cross-vat.
James
More information about the cap-talk
mailing list