void AppendUTF8toUTF16(const nsACString& aSource, nsAString& aDest) { if (!AppendUTF8toUTF16(aSource, aDest, mozilla::fallible)) { aDest.AllocFailed(aDest.Length() + aSource.Length()); } }
void CopyASCIItoUTF16(const nsACString& aSource, nsAString& aDest) { if (!CopyASCIItoUTF16(aSource, aDest, mozilla::fallible)) { // Note that this may wildly underestimate the allocation that failed, as // we report the length of aSource as UTF-16 instead of UTF-8. aDest.AllocFailed(aDest.Length() + aSource.Length()); } }