Closed Bug 368328 Opened 18 years ago Closed 18 years ago

ASSERTION: Must have a buffered input stream: 'NS_InputStreamIsBuffered(pIStream)'

Categories

(Core :: XPCOM, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: Waldo, Assigned: sciguyryan)

References

()

Details

(Keywords: assertion)

Attachments

(1 file)

See URL in a debug build. The assertion seems to occur because NS_InputStreamIsBuffered tries to read a byte from a stream which is empty and fails in some particular way -- a non-empty string won't trigger the assertion.
I'd say this is a bug in NS_InputStreamIsBuffered(), no? It's lying about the stream...
Assignee: general → nobody
Component: DOM: Mozilla Extensions → XPCOM
Flags: blocking1.9?
QA Contact: ian → xpcom
Yeah, probably; I was a bit lazy in researching the bug when I filed it. :-\
Assignee: nobody → sciguyryan
Attached patch Patch v1Splinter Review
Patch v1 I'm not actually sure we still need to |result| here but this should check for empty streams.
Attachment #264665 - Flags: superreview?(benjamin)
Attachment #264665 - Flags: review?(benjamin)
Status: NEW → ASSIGNED
Attachment #264665 - Flags: superreview?(cbiesinger)
Attachment #264665 - Flags: superreview?(benjamin)
Attachment #264665 - Flags: review?(benjamin)
Attachment #264665 - Flags: review+
Comment on attachment 264665 [details] [diff] [review] Patch v1 sr=biesi, although it is unfortunate that this will not detect certain kinds of unsupported ReadSegments
Attachment #264665 - Flags: superreview?(cbiesinger) → superreview+
(In reply to comment #4) > (From update of attachment 264665 [details] [diff] [review]) > sr=biesi, although it is unfortunate that this will not detect certain kinds of > unsupported ReadSegments > Maybe a follow-up bug could be filed to add a new function with the old checking abilities?
OS: Linux → All
Hardware: PC → All
Whiteboard: [checkin needed]
I'm not sure but the option would still be there to use it, then again if it has no callers would it be worth it?
well really how would a caller choose between the two?
(In reply to comment #8) > well really how would a caller choose between the two? > They couldn't really. The both would have basically the same functionality in most circumstances and only differ in a small number of situations...
right, so I don't think there's much point in adding that function.
Checked in. Thanks for the patch!
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: blocking1.9?
Resolution: --- → FIXED
Whiteboard: [checkin needed]
If this is done as an xpcshell test, the assertion will actually cause the test to fail, if/when we get around to running the unit tests on debug builds in addition to unpackaged release builds.
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: