mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 22:35:43 +00:00
Use nsAutoString instead of nsCAutoString to avoid double string copy
This commit is contained in:
parent
592de366b8
commit
dc04e68f6a
@ -988,7 +988,7 @@ RDFContentSinkImpl::GetIdAboutAttribute(const nsIParserNode& aNode,
|
|||||||
nsAutoString uri = aNode.GetValueAt(i);
|
nsAutoString uri = aNode.GetValueAt(i);
|
||||||
nsRDFParserUtils::StripAndConvert(uri);
|
nsRDFParserUtils::StripAndConvert(uri);
|
||||||
|
|
||||||
rdf_MakeAbsoluteURI(nsCAutoString(docURI), uri);
|
rdf_MakeAbsoluteURI(nsAutoString(docURI), uri);
|
||||||
|
|
||||||
return gRDFService->GetUnicodeResource(uri.GetUnicode(), aResource);
|
return gRDFService->GetUnicodeResource(uri.GetUnicode(), aResource);
|
||||||
}
|
}
|
||||||
@ -1018,7 +1018,7 @@ RDFContentSinkImpl::GetIdAboutAttribute(const nsIParserNode& aNode,
|
|||||||
// attribute.
|
// attribute.
|
||||||
name.Insert('#', 0);
|
name.Insert('#', 0);
|
||||||
|
|
||||||
rdf_MakeAbsoluteURI(nsCAutoString(docURI), name);
|
rdf_MakeAbsoluteURI(nsAutoString(docURI), name);
|
||||||
|
|
||||||
return gRDFService->GetUnicodeResource(name.GetUnicode(), aResource);
|
return gRDFService->GetUnicodeResource(name.GetUnicode(), aResource);
|
||||||
}
|
}
|
||||||
@ -1073,7 +1073,7 @@ RDFContentSinkImpl::GetResourceAttribute(const nsIParserNode& aNode,
|
|||||||
const char* documentURL;
|
const char* documentURL;
|
||||||
#endif
|
#endif
|
||||||
mDocumentURL->GetSpec(&documentURL);
|
mDocumentURL->GetSpec(&documentURL);
|
||||||
rdf_MakeAbsoluteURI(documentURL, uri);
|
rdf_MakeAbsoluteURI(nsAutoString(documentURL), uri);
|
||||||
#ifdef NECKO
|
#ifdef NECKO
|
||||||
nsCRT::free(documentURL);
|
nsCRT::free(documentURL);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user