зеркало из https://github.com/mozilla/pjs.git
Bug 53057: Fixing up users of implicit |CharT*| conversion operators for nsCString to use |.get()| instead, rr=dbaron, rs=scc
This commit is contained in:
Родитель
c79a0759cb
Коммит
3b3426d0ea
|
@ -62,12 +62,8 @@ inBitmapURI::GetBitmapName(PRUnichar** aBitmapName)
|
|||
nsresult
|
||||
inBitmapURI::FormatSpec(char* *result)
|
||||
{
|
||||
nsCString spec(NS_BITMAP_SCHEME);
|
||||
|
||||
spec += "//";
|
||||
spec += mBitmapName;
|
||||
|
||||
*result = nsCRT::strdup(spec);
|
||||
*result = ToNewCString(NS_LITERAL_CSTRING(NS_BITMAP_SCHEME "//") +
|
||||
mBitmapName);
|
||||
return *result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ inDOMUtils::GetBindingURLs(nsIDOMElement *aElement, nsISimpleEnumerator **_retva
|
|||
uri += "#";
|
||||
uri += id;
|
||||
|
||||
nsCOMPtr<nsIAtom> a = NS_NewAtom(uri);
|
||||
nsCOMPtr<nsIAtom> a = NS_NewAtom(uri.get());
|
||||
urls->AppendElement(a);
|
||||
|
||||
binding->GetBaseBinding(getter_AddRefs(tempBinding));
|
||||
|
|
|
@ -226,7 +226,7 @@ NS_IMETHODIMP mozXMLTermStream::Open(nsIDOMWindowInternal* aDOMWindow,
|
|||
contractID += contentType;
|
||||
|
||||
nsCOMPtr<nsIDocumentLoaderFactory> docLoaderFactory;
|
||||
docLoaderFactory = do_CreateInstance(contractID, &result);
|
||||
docLoaderFactory = do_CreateInstance(contractID.get(), &result);
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
|
||||
|
|
|
@ -776,7 +776,7 @@ nsNSSComponent::VerifySignature(const char* aRSABuf, PRUint32 aRSABufLen,
|
|||
fingerprintStr.AssignWithConversion(fingerprint);
|
||||
PR_FREEIF(fingerprint);
|
||||
if (NS_FAILED(rv2)) return rv2;
|
||||
rv2 = mScriptSecurityManager->GetCertificatePrincipal(fingerprintStr, aPrincipal);
|
||||
rv2 = mScriptSecurityManager->GetCertificatePrincipal(fingerprintStr.get(), aPrincipal);
|
||||
if (NS_FAILED(rv2) || !*aPrincipal) return rv2;
|
||||
|
||||
nsCOMPtr<nsICertificatePrincipal> certPrincipal = do_QueryInterface(*aPrincipal, &rv2);
|
||||
|
@ -787,7 +787,7 @@ nsNSSComponent::VerifySignature(const char* aRSABuf, PRUint32 aRSABufLen,
|
|||
nsCAutoString orgNameStr;
|
||||
orgNameStr.AssignWithConversion(orgName);
|
||||
PR_FREEIF(orgName);
|
||||
rv2 = certPrincipal->SetCommonName(orgNameStr);
|
||||
rv2 = certPrincipal->SetCommonName(orgNameStr.get());
|
||||
if (NS_FAILED(rv2)) return rv2;
|
||||
}
|
||||
|
||||
|
|
|
@ -308,7 +308,7 @@ PRInt32 nsRegisterItem::Complete()
|
|||
if (mChromeType & CHROME_SKIN)
|
||||
{
|
||||
installStr = PR_smprintf("skin,%s,url,%s\n",
|
||||
location, (const char*)mURL);
|
||||
location, mURL.get());
|
||||
if (installStr)
|
||||
{
|
||||
actual = strlen(installStr);
|
||||
|
@ -326,7 +326,7 @@ PRInt32 nsRegisterItem::Complete()
|
|||
if (mChromeType & CHROME_LOCALE)
|
||||
{
|
||||
installStr = PR_smprintf("locale,%s,url,%s\n",
|
||||
location, (const char*)mURL);
|
||||
location, mURL.get());
|
||||
if (installStr)
|
||||
{
|
||||
actual = strlen(installStr);
|
||||
|
@ -344,7 +344,7 @@ PRInt32 nsRegisterItem::Complete()
|
|||
if (mChromeType & CHROME_CONTENT)
|
||||
{
|
||||
installStr = PR_smprintf("content,%s,url,%s\n",
|
||||
location, (const char*)mURL);
|
||||
location, mURL.get());
|
||||
if (installStr)
|
||||
{
|
||||
actual = strlen(installStr);
|
||||
|
|
|
@ -65,9 +65,7 @@ nsStubListener::ItemScheduled(const PRUnichar* message )
|
|||
{
|
||||
if (m_progress)
|
||||
{
|
||||
nsCAutoString messageCStr;
|
||||
messageCStr.AssignWithConversion(message);
|
||||
m_progress( messageCStr, 0, 0 );
|
||||
m_progress( NS_LossyConvertUCS2toASCII(message).get(), 0, 0 );
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -77,9 +75,7 @@ nsStubListener::FinalizeProgress(const PRUnichar* message, PRInt32 itemNum, PRIn
|
|||
{
|
||||
if (m_progress)
|
||||
{
|
||||
nsCAutoString messageCStr;
|
||||
messageCStr.AssignWithConversion(message);
|
||||
m_progress( messageCStr, itemNum, totNum );
|
||||
m_progress( NS_LossyConvertUCS2toASCII(message).get(), itemNum, totNum );
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче