Re: IPCStream landed in mozilla-central

2016-05-21 Thread Ben Kelly
On Sat, May 21, 2016 at 2:05 PM, Ben Kelly wrote: > > On May 21, 2016 9:44 AM, "Honza Bambas" wrote: > > If it's nsPipeInputStream then it's definitely alright. OTOH, we do > copy the memory, right? I was somehow hoping that you just expose the > IPC-allocated buffers via your own implementati

Re: IPCStream landed in mozilla-central

2016-05-21 Thread Ben Kelly
On May 21, 2016 9:44 AM, "Honza Bambas" wrote: > If it's nsPipeInputStream then it's definitely alright. OTOH, we do copy the memory, right? I was somehow hoping that you just expose the IPC-allocated buffers via your own implementation of nsIInputStream, avoiding coping to an XPCOM pipe. That

Re: IPCStream landed in mozilla-central

2016-05-21 Thread Honza Bambas
On 5/21/2016 15:10, Ben Kelly wrote: On May 21, 2016 7:45 AM, "Honza Bambas" wrote: But that doesn't mean "a fixed length input stream" - actually I may not even follow how you have translated this to you. Sorry, I was thinking a single OnDataAvailable call for the one IPC call just passing t

Re: IPCStream landed in mozilla-central

2016-05-21 Thread Ben Kelly
On May 21, 2016 7:45 AM, "Honza Bambas" wrote: > But that doesn't mean "a fixed length input stream" - actually I may not even follow how you have translated this to you. Sorry, I was thinking a single OnDataAvailable call for the one IPC call just passing the stream. Clearly that won't work, th

Re: IPCStream landed in mozilla-central

2016-05-21 Thread Honza Bambas
On 5/21/2016 2:36, Ben Kelly wrote: On Fri, May 20, 2016 at 8:10 PM, Ben Kelly wrote: On Fri, May 20, 2016 at 11:09 AM, Ben Kelly wrote: On Fri, May 20, 2016 at 7:37 AM, Honza Bambas wrote: And I do! :) Actually any parent necko channel, mainly HTTP, which sends data to the child proces

Re: IPCStream landed in mozilla-central

2016-05-20 Thread Ben Kelly
On Fri, May 20, 2016 at 8:10 PM, Ben Kelly wrote: > On Fri, May 20, 2016 at 11:09 AM, Ben Kelly wrote: > >> On Fri, May 20, 2016 at 7:37 AM, Honza Bambas >> wrote: >> >>> And I do! :) Actually any parent necko channel, mainly HTTP, which >>> sends data to the child process. We also have bug 1

Re: IPCStream landed in mozilla-central

2016-05-20 Thread Ben Kelly
On Fri, May 20, 2016 at 11:09 AM, Ben Kelly wrote: > On Fri, May 20, 2016 at 7:37 AM, Honza Bambas wrote: > >> And I do! :) Actually any parent necko channel, mainly HTTP, which sends >> data to the child process. We also have bug 1110596 which complains about >> too much memory copying in tha

Re: IPCStream landed in mozilla-central

2016-05-20 Thread Ben Kelly
On Fri, May 20, 2016 at 7:37 AM, Honza Bambas wrote: > And I do! :) Actually any parent necko channel, mainly HTTP, which sends > data to the child process. We also have bug 1110596 which complains about > too much memory copying in that code. > Could your IPCStream be used for that? > Yes, I

Re: IPCStream landed in mozilla-central

2016-05-20 Thread Honza Bambas
On 5/19/2016 17:04, Ben Kelly wrote: Hi all, FYI, I've landed a new IPDL type in bug 1093357 called IPCStream. This is intended to make it easier to serialize nsIInputStreams across IPC. In short, IPCStream: 1) Supports our existing serializable nsInputStreams. 2) Also automatically handles s

Re: IPCStream landed in mozilla-central

2016-05-19 Thread Ting-Yu Chou
On Fri, May 20, 2016 at 2:19 AM, Ben Kelly wrote: > On Thu, May 19, 2016 at 1:41 PM, Andrew McCreight > wrote: > > > On Thu, May 19, 2016 at 8:04 AM, Ben Kelly wrote: > > > > > 3) Supports async pipe streams using a new PSendStream actor from > > > *child-to-parent*. I have plans to add suppor

Re: IPCStream landed in mozilla-central

2016-05-19 Thread Ben Kelly
On Thu, May 19, 2016 at 1:41 PM, Andrew McCreight wrote: > On Thu, May 19, 2016 at 8:04 AM, Ben Kelly wrote: > > > 3) Supports async pipe streams using a new PSendStream actor from > > *child-to-parent*. I have plans to add support for parent-to-child, but > I > > don't have a consumer yet and

Re: IPCStream landed in mozilla-central

2016-05-19 Thread Ben Kelly
On Thu, May 19, 2016 at 1:41 PM, Andrew McCreight wrote: > On Thu, May 19, 2016 at 8:04 AM, Ben Kelly wrote: > > > 3) Supports async pipe streams using a new PSendStream actor from > > *child-to-parent*. I have plans to add support for parent-to-child, but > I > > don't have a consumer yet and

Re: IPCStream landed in mozilla-central

2016-05-19 Thread Andrew McCreight
On Thu, May 19, 2016 at 8:04 AM, Ben Kelly wrote: > 3) Supports async pipe streams using a new PSendStream actor from > *child-to-parent*. I have plans to add support for parent-to-child, but I > don't have a consumer yet and we need to figure out some issues with > PBackground targeting worker

IPCStream landed in mozilla-central

2016-05-19 Thread Ben Kelly
Hi all, FYI, I've landed a new IPDL type in bug 1093357 called IPCStream. This is intended to make it easier to serialize nsIInputStreams across IPC. In short, IPCStream: 1) Supports our existing serializable nsInputStreams. 2) Also automatically handles send file descriptors using the PFileDes