bug #85271: sr=waterson, r={beard, jag, dbaron}, a=asa. Eliminate features of |nsXPIDLC?String| that keep it out of the string hierarchy (i.e., using assigment to rebind ownership, static |Copy| members, and |getter_Shares|), fixing some leaks in the process.
git-svn-id: svn://10.0.0.236/trunk@234760 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
88ec3d1cbc
commit
f06ec165a0
@ -932,7 +932,7 @@ InternetSearchDataSource::GetURI(char **uri)
|
||||
if (! uri)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if ((*uri = nsXPIDLCString::Copy("rdf:internetsearch")) == nsnull)
|
||||
if ((*uri = nsCRT::strdup("rdf:internetsearch")) == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
@ -4504,7 +4504,7 @@ InternetSearchDataSource::OnStopRequest(nsIRequest *request, nsISupports *ctxt,
|
||||
lastModValue = val;
|
||||
if (NS_SUCCEEDED(httpChannel->GetResponseHeader("Content-Length", getter_Copies(val))))
|
||||
contentLengthValue = val;
|
||||
val = 0;
|
||||
val.Adopt(0);
|
||||
|
||||
// should we fetch the entire file?
|
||||
PRBool updateSearchEngineFile = PR_FALSE;
|
||||
|
||||
@ -148,7 +148,7 @@ LocalSearchDataSource::GetURI(char **uri)
|
||||
if (! uri)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
if ((*uri = nsXPIDLCString::Copy("rdf:localsearch")) == nsnull)
|
||||
if ((*uri = nsCRT::strdup("rdf:localsearch")) == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
return NS_OK;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user