converter);
converter).write_terminator();
UTF8ToNewUnicode( const nsACString& aSource )  {    nsACString::const_iterator start, end;    CalculateUTF8Length calculator;    copy_string(aSource.BeginReading(start), aSource.EndReading(end),                calculator);    PRUnichar *result = NS_STATIC_CAST(PRUnichar*,        nsMemory::Alloc(sizeof(PRUnichar) * (calculator.Length() + 1)));    ConvertUTF8toUCS2 converter(result);    copy_string(aSource.BeginReading(start), aSource.EndReading(end),                converter);    NS_ASSERTION(calculator.Length() == converter.Length(), "length mismatch");    return result;  }