зеркало из https://github.com/mozilla/gecko-dev.git
fix bug 209699 r=dougt, sr=jst - move some consumers over to CopyUTF8toUTF16
This commit is contained in:
Родитель
ae9176bd25
Коммит
63cdbb3203
|
@ -358,7 +358,7 @@ void* PermanentAtomImpl::operator new ( size_t size, AtomImpl* aAtom ) CPP_THROW
|
|||
NS_IMETHODIMP
|
||||
AtomImpl::ToString(nsAString& aBuf)
|
||||
{
|
||||
aBuf.Assign(NS_ConvertUTF8toUCS2(mString));
|
||||
CopyUTF8toUTF16(nsDependentCString(mString), aBuf);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "prtypes.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsString.h"
|
||||
#include "nsReadableUtils.h"
|
||||
#include "nsISimpleEnumerator.h"
|
||||
#include "nsSupportsPrimitives.h"
|
||||
|
||||
|
@ -168,10 +169,8 @@ nsStringEnumerator::GetNext(nsACString& aResult)
|
|||
{
|
||||
NS_ENSURE_TRUE(mIndex < Count(), NS_ERROR_UNEXPECTED);
|
||||
|
||||
// XXX this needs CopyUCS2toUTF8(aResult,
|
||||
// *mArray->StringAt(mIndex++));
|
||||
if (mIsUnicode)
|
||||
aResult = NS_ConvertUCS2toUTF8(*mArray->StringAt(mIndex++));
|
||||
CopyUTF16toUTF8(*mArray->StringAt(mIndex++), aResult);
|
||||
else
|
||||
aResult = *mCArray->CStringAt(mIndex++);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче