зеркало из https://github.com/mozilla/pjs.git
Fix for 80101. minor optimization in GetName(). submitted by sfraser@netscape.com, sr=dougt@netscape.com
This commit is contained in:
Родитель
f11de1e108
Коммит
5e32338b16
|
@ -324,7 +324,7 @@ nsFileTransport::Create(nsISupports* aOuter, const nsIID& aIID, void* *aResult)
|
|||
NS_IMETHODIMP
|
||||
nsFileTransport::GetName(PRUnichar* *result)
|
||||
{
|
||||
nsString name;
|
||||
nsAutoString name;
|
||||
name.AppendWithConversion(mStreamName);
|
||||
*result = name.ToNewUnicode();
|
||||
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
|
@ -126,7 +126,7 @@ nsFileChannel::GetName(PRUnichar* *result)
|
|||
nsXPIDLCString urlStr;
|
||||
rv = mURI->GetSpec(getter_Copies(urlStr));
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
nsString name;
|
||||
nsAutoString name;
|
||||
name.AppendWithConversion(urlStr);
|
||||
*result = name.ToNewUnicode();
|
||||
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
|
|
Загрузка…
Ссылка в новой задаче