Fixing copying of wstring argument, this fixes the problem with only the first character of some status messages showing up in the browser. This fix also eliminates one string copy. r=dougt@netscape.com, a=mozbot.

This commit is contained in:
jst%citec.fi 2000-01-14 00:06:57 +00:00
parent b0ba1f5b70
commit eeccc4859d

View File

@ -135,15 +135,17 @@ nsProxyObjectCallInfo::CopyStrings(PRBool copy)
{
if (copy)
{
nsString str((char*)mParameterList[i].val.p);
void *ptr = mParameterList[i].val.p;
if (type_tag == nsXPTType::T_CHAR_STR)
{
mParameterList[i].val.p = str.ToNewCString();
mParameterList[i].val.p =
nsCRT::strdup((const char *)ptr);
}
else if (type_tag == nsXPTType::T_WCHAR_STR)
{
mParameterList[i].val.p = str.ToNewUnicode();
mParameterList[i].val.p =
nsCRT::strdup((const PRUnichar *)ptr);
}
}
else