rv = aWriter(this, aClosure, mString->get() + mPos,
rv = aWriter(this, aClosure, iter.get() + mPos,
StringUnicharInputStream::ReadSegments(nsWriteUnicharSegmentFun aWriter,                                       void* aClosure,                                       PRUint32 aCount, PRUint32 *aReadCount){  PRUint32 bytesWritten;  PRUint32 totalBytesWritten = 0;  nsresult rv;  aCount = PR_MIN(mString->Length() - mPos, aCount);    while (aCount) {    rv = aWriter(this, aClosure, mString->get() + mPos,                 totalBytesWritten, aCount, &bytesWritten);        if (NS_FAILED(rv)) {      // don't propagate errors to the caller      break;    }        aCount -= bytesWritten;    totalBytesWritten += bytesWritten;    mPos += bytesWritten;  }    *aReadCount = totalBytesWritten;    return NS_OK;}