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

@@ -919,7 +919,7 @@ void
nsString::ReplaceChar( const char16_t* aSet, char16_t aNewChar )
{
if (!EnsureMutable()) // XXX do this lazily?
NS_ABORT_OOM(mLength);
AllocFailed(mLength);
char16_t* data = mData;
uint32_t lenRemaining = mLength;