nsCmdLineService::GetProgramName needs to copy the string to be compliant with the interface definition. Bug 249737, r+sr=jst.
git-svn-id: svn://10.0.0.236/trunk@158734 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
90236fac10
commit
a0a82bdf9d
@ -222,12 +222,8 @@ nsCmdLineService::GetURLToLoad(char ** aResult)
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::GetProgramName(char ** aResult)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
*aResult = (char *)mArgValueList.SafeElementAt(0);
|
||||
|
||||
return rv;
|
||||
|
||||
*aResult = nsCRT::strdup((char *)mArgValueList.SafeElementAt(0));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave)
|
||||
|
||||
@ -222,12 +222,8 @@ nsCmdLineService::GetURLToLoad(char ** aResult)
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::GetProgramName(char ** aResult)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
*aResult = (char *)mArgValueList.SafeElementAt(0);
|
||||
|
||||
return rv;
|
||||
|
||||
*aResult = nsCRT::strdup((char *)mArgValueList.SafeElementAt(0));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user