Bug 1097283: Fix count/byte mismatches in NS_ABORT_OOM calls. r=froydnj

This commit is contained in:
David Major
2014-11-12 21:13:44 +13:00
parent b3f8716d59
commit d85f8b5439
7 changed files with 40 additions and 26 deletions

View File

@@ -95,7 +95,7 @@ void
AppendASCIItoUTF16(const nsACString& aSource, nsAString& aDest)
{
if (!AppendASCIItoUTF16(aSource, aDest, mozilla::fallible_t())) {
NS_ABORT_OOM(aDest.Length() + aSource.Length());
aDest.AllocFailed(aDest.Length() + aSource.Length());
}
}
@@ -144,7 +144,7 @@ void
AppendUTF16toUTF8(const nsAString& aSource, nsACString& aDest)
{
if (!AppendUTF16toUTF8(aSource, aDest, mozilla::fallible_t())) {
NS_ABORT_OOM(aDest.Length() + aSource.Length());
aDest.AllocFailed(aDest.Length() + aSource.Length());
}
}
@@ -185,7 +185,7 @@ void
AppendUTF8toUTF16(const nsACString& aSource, nsAString& aDest)
{
if (!AppendUTF8toUTF16(aSource, aDest, mozilla::fallible_t())) {
NS_ABORT_OOM(aDest.Length() + aSource.Length());
aDest.AllocFailed(aDest.Length() + aSource.Length());
}
}