Closed Bug 46777 Opened 24 years ago Closed 24 years ago

clean up xpcom streams

Categories

(Core :: XPCOM, defect, P3)

defect

Tracking

()

VERIFIED FIXED

People

(Reporter: warrensomebody, Assigned: warrensomebody)

References

Details

(Keywords: arch, Whiteboard: [nsbeta3+])

Attachments

(1 file)

Need to clean up nsIInputStream, nsIOutputStream, nsIPipe, buffered streams, 
etc. Fixes in my tree.
Keywords: arch, nsbeta3
From Vidur's list:

- nsIInputStream
    - Ambiguity with Available() - length of data in underlying buffer or
  content length? The former.
    - Available() should never block.
    - names should be lowercased

- nsIOutputStream
    - lowercase names
    - Flush semantics should be clarified. It's a transaction - data is
  pushed to the next stage.
    - scc to own.

- nsIBaseStream
    - Get rid of this interface, move Close() into OutputStream,
  InputStream to help versioning.
Blocks: 11232
Needed for embedding to fix spin problem.
Whiteboard: [nsbeta3+]
Target Milestone: --- → M17
*** Bug 39467 has been marked as a duplicate of this bug. ***
Here's the proposed changes for streams. They seem to work for the things I've 
tried, but I'm particularly concerned about the http changes I've made to header 
parsing -- Ruslan or Gagan should look them over. (The changes here are because 
the Search method on pipes went away, so the routine was rewritten to consume a 
line at a time.)

Speaking of a line at a time -- Rick: I had to change the pipe code to allow me 
to consume some of the data from the stream (in the ReadSegments callback), but 
still return NS_BASE_STREAM_WOULD_BLOCK so that no more is requested for that 
call to ReadSegments. This essentially amounted to incrementing the pipe's 
internal cursor after returning from the callback, but before checking for 
WOULD_BLOCK. It seems to work, but you know how touch this pipe stuff has 
been. Similarly, I tried to fix up WriteSegments, but that's untested.

Jud: You should look over the new stream APIs to see if they look good. It would 
be great if you or Doug could give this stuff a try to see if it's going to 
solve AOL spin problem.
Wow, that patch went in right at midnight. I wonder if that means anything.
Keywords: patch
gagan/ruslan should do HTTP and rick should do the pipe impl review. for all the 
rest, r=valeski.
It's in.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
please verify
Status: RESOLVED → VERIFIED
Marking Verified.  Please reopen if problem reoccurs.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: