checking in for scc.

bug #85271: avoid regressions by re-creating the old behavior near |nsCRT::strdup|, see bug #86316
This commit is contained in:
bryner%uiuc.edu 2001-06-18 03:48:21 +00:00
parent d230ec28ee
commit ad4e9b47c8
2 changed files with 3 additions and 3 deletions

View File

@ -1546,7 +1546,7 @@ nsCrypto::GenerateCRMFRequest(nsIDOMCRMFObject** aReturn)
args->m_cx = cx;
args->m_scope = JS_GetParent(cx, script_obj);
args->m_jsCallback.Adopt(nsCRT::strdup(jsCallback));
args->m_jsCallback.Adopt(jsCallback ? nsCRT::strdup(jsCallback) : 0);
args->m_principals = principals;
nsCryptoRunnable *cryptoRunnable = new nsCryptoRunnable(args);

View File

@ -173,7 +173,7 @@ nsNSSSocketInfo::SetFirstWrite(PRBool aFirstWrite)
nsresult
nsNSSSocketInfo::SetHostName(const char* host)
{
mHostName.Adopt(nsCRT::strdup(host));
mHostName.Adopt(host ? nsCRT::strdup(host) : 0);
return NS_OK;
}
@ -201,7 +201,7 @@ nsNSSSocketInfo::GetPort(PRInt32 *aPort)
nsresult
nsNSSSocketInfo::SetProxyHost(const char* aProxyHost)
{
mProxyHostName.Adopt(nsCRT::strdup(aProxyHost));
mProxyHostName.Adopt(aProxyHost ? nsCRT::strdup(aProxyHost) : 0);
return NS_OK;
}