Changes

Jump to: navigation, search

IPC Protocols

487 bytes added, 23:15, 15 May 2009
Strawman message grammar
MessageArgument :: Type Identifier
Type :: SharingQualifier BasicType| ActorHandle
SharingQualifier :: (\epsilon | 'transfer' | 'share')
BasicType :: BuiltinType | ImportedType
ActorHandle :: ('parent' | 'child') 'actor' ProtocolName (':' StateName)?
A few items are worth calling out.
A BasicType is a C++ type that can be transferred in a message. We will provide a set of BuiltinTypes like void, int, and so on. Protocol writers can also ''import'' foreign types for which marshall/unmarshall traits are defined, and/or that can be allocated in shared memory. (We may need to support union types for NPAPI.)
 
An ActorHandle is a handle to an already-created protocol actor; this can be thought of by analogy to <code>sockaddr_t</code>; it's a way to refer to a created actor. The actor is either a ''parent'' or ''child'', and may be required to be in a particular state. '''TODO''': the semantics of this still aren't 100% clear to me. I'll need to work through a concrete example to figure them out.
If desired, we can add a notion of "privilege" to the message type system. For example, chrome is more privileged than content, which is more privileged than plugin. With this system, we can cheaply guarantee that privileged objects don't flow to unprivileged actors.
Confirm
699
edits

Navigation menu