IPC Protocols: Difference between revisions

Jump to navigation Jump to search
Line 59: Line 59:
   MessageArgument :: Type Identifier
   MessageArgument :: Type Identifier
    
    
   Type :: SharingQualifier BasicType
   Type :: SharingQualifier BasicType | ActorHandle
   SharingQualifier :: (\epsilon | 'transfer' | 'share')
   SharingQualifier :: (\epsilon | 'transfer' | 'share')
   BasicType :: BuiltinType | ImportedType
   BasicType :: BuiltinType | ImportedType
  ActorHandle :: ('parent' | 'child') 'actor' ProtocolName (':' StateName)?


A few items are worth calling out.
A few items are worth calling out.
Line 77: Line 78:


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.)
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.
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.
Confirmed users
699

edits

Navigation menu