mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-31 11:01:40 +00:00
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:
parent
b0ba1f5b70
commit
eeccc4859d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user