> I propose adding this interface:
> 
>   interface nsICloneableInputStream : nsIInputStream
>   {
>     nsIInputStream clone();
>   };
> 
> The clone() method returns a copy of the stream in the most efficient manner
> possible.  This might mean different operations depending on the concrete
> implementation of the stream.
> 
> For example,
> 
>  * nsFileInputStream would simply dup() its file descriptors like when
>  serializing across IPC.
>  * nsStringStream would simply do an nsCString-style copy construction.
>  * nsPipe would create a new nsPipeInputStream that reads from the same
>  underlying pipe buffer.  The buffer is maintained until all cloned input
>  streams are closed.

I didn't get any objections, so I'm proceeding with this.  If you're 
interested, follow along in this bug:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1100398

Thanks.

Ben
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to