Closed Bug 12159 Opened 21 years ago Closed 21 years ago
Need ability to pass binary data through IDL
in nsItransferable, I have a need to pass around binary data, which right now is represented as a void*. This doesn't idl very well, and we need this to be available from JS in some manner. scc suggested using streams, but at last look (and talking with brendan and warren), streams in their current incarnation caused us to copy the data 7 times round trip (copy then paste). The data could be binary (a pointer, a sound, or a gif) which is why i don't think using a wstring would work perfectly in all cases. This is blocking my conversion of nsITransferable to idl.
going to try adding a "hunk" primitave to nsISupportsPrimitives.idl for passing hunks of raw data.
jband seems to have a reasonable solution to this problem. I'm re-assigning the bug to him. Thanks, jband!
since we don't have any binary data right now, lowering priority because we have a solution that will work, but still incorporate binary data when this comes in.
Streams shouldn't copy data 7 times. Try the NS_NewPipe call in nsPipe2.h. It's pretty clean and fast. Warren
I checked in changes to nsISupportsPrimitives to implement nsISupportsVoid as a wrapper for void*. Does it do what you want?
Putting on [Perf] radar.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
should be sufficient. closing bug.
code level, verifying.
You need to log in before you can comment on or make changes to this bug.