ToNewUTF8String( const nsAReadableString& aSource )
ToNewUTF8String( const nsAString& aSource )
ToNewUTF8String( const nsAReadableString& aSource )  {    NS_ConvertUCS2toUTF8 temp(aSource);    char* result;    if (temp.mOwnsBuffer) {      // We allocated. Trick the string into not freeing its buffer to      // avoid an extra allocation.      result = temp.mStr;      temp.mStr=0;      temp.mOwnsBuffer = PR_FALSE;    }    else {      // We didn't allocate a buffer, so we need to copy it out of the      // nsCAutoString's storage.      result = nsCRT::strdup(temp.mStr);    }    return result;  }