On 5/21/2016 15:10, Ben Kelly wrote:
On May 21, 2016 7:45 AM, "Honza Bambas" <hbam...@mozilla.com> 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, though.

As I understand, your impl of Available() may return _different_ number
of bytes than the stream is then able to deliver when Read/ReadSegments on
it is called, right?  Can you explain why?

No.  Available() should work fine.  It's just an nsPipeInputStream.

So we should be able to loop and call ODA for each ReadSegments callback
after the IPC hop.

Sorry for my confusion.

Ben

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.


-hb-

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to