NS_ASSERTION(mLen >= mPos, "unsigned madness");
StringUnicharInputStream::Read(PRUnichar* aBuf,                               PRUint32 aCount,                               PRUint32 *aReadCount){  if (mPos >= mLen) {    *aReadCount = 0;    return NS_OK;  }  nsAString::const_iterator iter;  mString->BeginReading(iter);  const PRUnichar* us = iter.get();  NS_ASSERTION(mLen >= mPos, "unsigned madness");  PRUint32 amount = mLen - mPos;  if (amount > aCount) {    amount = aCount;  }  memcpy(aBuf, us + mPos, sizeof(PRUnichar) * amount);  mPos += amount;  *aReadCount = amount;  return NS_OK;}