return NS_ERROR_OUT_OF_MEMORY;
return NS_BASE_STREAM_WOULD_BLOCK;
nsPipe::nsPipeOutputStream::Flush(void){    nsPipe* pipe = GET_OUTPUTSTREAM_PIPE(this);    nsAutoCMonitor mon(pipe);    nsresult rv = NS_OK;    PRBool firstTime = PR_TRUE;    while (PR_TRUE) {        // check write buffer again while in the monitor        PRUint32 amt;        const char* buf;        rv = pipe->GetReadSegment(0, &buf, &amt);        if (firstTime && amt == 0) {            // If we think we needed to flush, yet there's nothing            // in the buffer to read, we must have not been able to             // allocate any segments. Return out of memory:            return NS_ERROR_OUT_OF_MEMORY;        }        if (NS_FAILED(rv) || amt == 0) return rv;        firstTime = PR_FALSE;        // else notify the reader and wait        rv = mon.Notify();        if (NS_FAILED(rv)) return rv;   // interrupted        if (mBlocking) {            rv = mon.Wait();            if (NS_FAILED(rv)) return rv;   // interrupted        }        else {            return NS_BASE_STREAM_WOULD_BLOCK;        }    }    return NS_OK;}