Closed Bug 12159 Opened 21 years ago Closed 21 years ago

Need ability to pass binary data through IDL

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: mikepinkerton, Assigned: mikepinkerton)

References

Details

(Whiteboard: [Perf])

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.
Blocks: 11821
going to try adding a "hunk" primitave to nsISupportsPrimitives.idl for passing
hunks of raw data.
Status: NEW → ASSIGNED
Assignee: scc → jband
Status: ASSIGNED → NEW
jband seems to have a reasonable solution to this problem.  I'm re-assigning the
bug to him.  Thanks, jband!
Severity: blocker → normal
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
Assignee: jband → pinkerton
I checked in changes to nsISupportsPrimitives to implement nsISupportsVoid as a
wrapper for void*. Does it do what you want?
Whiteboard: [Perf]
Putting on [Perf] radar.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Status: RESOLVED → VERIFIED
should be sufficient. closing bug.
code level, verifying.
You need to log in before you can comment on or make changes to this bug.