Necko: Electrolysis design and subprojects: Difference between revisions

Jump to navigation Jump to search
Line 34: Line 34:
# Request from a child process
# Request from a child process
#* The basic design for requests from child processes is that they should "wrap" a regular request on the parent, using IPDL.  In other words, we hope to keep the existing nsHttpChannel, nsHttpHandler, etc. code as unmodified as possible; this code should not need to know whether it is servicing a child or a parent request.  The logic for supporting a child request should be handled within the IPDL protocol classes instead whenever possible (for instance, HttpChannelParent).
#* The basic design for requests from child processes is that they should "wrap" a regular request on the parent, using IPDL.  In other words, we hope to keep the existing nsHttpChannel, nsHttpHandler, etc. code as unmodified as possible; this code should not need to know whether it is servicing a child or a parent request.  The logic for supporting a child request should be handled within the IPDL protocol classes instead whenever possible (for instance, HttpChannelParent).
#** Some of the existing necko architecture will exist in both the parent/child, and will need to know at some times where they are running; for instance, nsHttpHandler needs to know whether to hand out an nsHttpChannel (if it's in the parent) or an HttpChannelChild (if it's in the child).  For this there is a IsNeckoChild() function, which returns true if called within the child process.   
#** Some of the existing necko architecture will exist in both the parent/child, and will need to know at some times where they are running; for instance, nsHttpHandler needs to know whether to hand out an nsHttpChannel (if it's in the parent) or an HttpChannelChild (if it's in the child).  For this there is a IsNeckoChild() function, which returns true if called within the child process.  For certain optimizations (ex: consolidating OnDataAvail and OnStatus/OnProgress into one IPDL message) it is also useful for the chrome nsHttpChannel to know if it is servicing a remote child request: this is true if "mRemoteChannel" is set.
 
So far we have not needed to have a "IsServicingChildRequest"-type function, but
we may need one at some point.


=== Sync and async IPC messages ===
=== Sync and async IPC messages ===
Confirmed users
431

edits

Navigation menu