Last Comment Bug 528569 - Storage stream's output stream should report itself as blocking
: Storage stream's output stream should report itself as blocking
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla11
Assigned To: Bjarne (:bjarne)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-13 11:49 PST by Honza Bambas (:mayhemer)
Modified: 2012-02-01 13:57 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
SImple fix (648 bytes, patch)
2011-11-14 15:17 PST, Bjarne (:bjarne)
cbiesinger: review+
Details | Diff | Splinter Review

Description Honza Bambas (:mayhemer) 2009-11-13 11:49:03 PST
Its implementation behaves that way, it never throws WOULD_BLOCK error, when the buffer is full (we are on the limit) we end up with NS_ERROR_OUT_OF_MEMORY (what is also not really correct).

The main reason is to be able to use storage stream with nsInputStreamTee that expects the sink stream be blocking and be able to limit the written size, what otherwise storage stream really fits.

See bug 515051 comment 63 and further.
Comment 1 Bjarne (:bjarne) 2011-11-14 15:17:10 PST
Created attachment 574448 [details] [diff] [review]
SImple fix

This might be needed for a patch for bug #602611...
Comment 2 Boris Zbarsky [:bz] (TPAC) 2011-11-14 17:07:10 PST
Comment on attachment 574448 [details] [diff] [review]
SImple fix

Seems fine to me, but please double-check with biesi?
Comment 3 Christian :Biesinger (don't email me, ping me on IRC) 2011-11-14 17:23:12 PST
Comment on attachment 574448 [details] [diff] [review]
SImple fix

this is probably OK, I don't think we ever use it with a stream copier or somesuch (if we did, we should reconsider this change)
Comment 5 Ed Morley [:emorley] 2011-11-20 14:23:06 PST
https://hg.mozilla.org/mozilla-central/rev/031b48dfef03

Note You need to log in before you can comment on or make changes to this bug.