Closed Bug 927407 Opened 11 years ago Closed 11 years ago

NS_{Input, Output}StreamIsBuffered should not cause main thread I/O when this can be avoided

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla27

People

(Reporter: Yoric, Assigned: Yoric)

References

Details

(Keywords: main-thread-io)

Attachments

(1 file)

NetUtil.asyncCopy calls ioUtil.inputStreamIsBuffered and ioUtil.outputStreamIsBuffered, both of which can cause main thread I/O for detection purposes. In particular, any attempt to read a nsIJARInputStream using NetUtil.asyncCopy will cause such main thread I/O. While this cannot be systematically avoided, we can trivially avoid such I/O when we know that the streams implement nsIBuffered{Input, Output}Stream.
Comment on attachment 817840 [details] [diff] [review] NS_{Input, Output}IsBuffered now QI to nsIBuffered{Input, Output}Stream before resorting to main thread I/O The suggested reviewers for XPCOM bugs is not super helpful.
Attachment #817840 - Flags: review?(continuation) → review?(benjamin)
Attachment #817840 - Flags: review?(benjamin) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: