mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 53057: [API] turn off implicit |CharT*| conversion operators for nsCString, rr=dbaron, rs=scc
This commit is contained in:
parent
6095c74c92
commit
f05776cedf
@ -45,6 +45,7 @@
|
||||
#include "nsISupportsPrimitives.h"
|
||||
#include "nsIObserver.h"
|
||||
#include "nsComponentManager.h"
|
||||
#include "nsReadableUtils.h"
|
||||
|
||||
#include "nsHashtableEnumerator.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
@ -311,7 +312,7 @@ nsCategoryManager::GetCategoryEntryRaw( const char *aCategoryName,
|
||||
nsCStringKey entryKey(aEntryName);
|
||||
LeafNode* entry = NS_STATIC_CAST(LeafNode*, category->Get(&entryKey));
|
||||
if (entry)
|
||||
status = (*_retval = nsCRT::strdup(*entry)) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
status = (*_retval = ToNewCString(*entry)) ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
return status;
|
||||
@ -365,7 +366,7 @@ nsCategoryManager::AddCategoryEntry( const char *aCategoryName,
|
||||
{
|
||||
// return the value that we're replacing
|
||||
if ( _retval )
|
||||
*_retval = nsCRT::strdup(*entry);
|
||||
*_retval = ToNewCString(*entry);
|
||||
}
|
||||
else
|
||||
status = NS_ERROR_INVALID_ARG; // ...stops us from putting the value in
|
||||
|
@ -578,7 +578,7 @@ nsNativeComponentLoader::DumpLoadError(nsDll *dll,
|
||||
|
||||
char demangled[4096] = "\0";
|
||||
|
||||
nsTraceRefcnt::DemangleSymbol(symbol,demangled,sizeof(demangled));
|
||||
nsTraceRefcnt::DemangleSymbol(symbol.get(),demangled,sizeof(demangled));
|
||||
|
||||
if (demangled && *demangled != '\0')
|
||||
demangledSymbol = demangled;
|
||||
@ -605,7 +605,7 @@ nsNativeComponentLoader::DumpLoadError(nsDll *dll,
|
||||
("nsNativeComponentLoader: %s(%s) Load FAILED with error:%s",
|
||||
aCallerName,
|
||||
dll->GetDisplayPath(),
|
||||
(const char *) errorMsg));
|
||||
errorMsg.get()));
|
||||
|
||||
|
||||
// Dump to screen if needed
|
||||
@ -615,7 +615,7 @@ nsNativeComponentLoader::DumpLoadError(nsDll *dll,
|
||||
"**************************************************\n",
|
||||
aCallerName,
|
||||
dll->GetDisplayPath(),
|
||||
(const char *) errorMsg);
|
||||
errorMsg.get());
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
|
@ -147,7 +147,7 @@ nsFastLoadService::NewFastLoadFile(const char* aBaseName, nsIFile* *aResult)
|
||||
nsCAutoString name(aBaseName);
|
||||
MASSAGE_BASENAME(name);
|
||||
name += PLATFORM_FASL_SUFFIX;
|
||||
rv = file->Append(name);
|
||||
rv = file->Append(name.get());
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
|
@ -1438,7 +1438,7 @@ NS_IMETHODIMP nsLocalFile::GetURL(char * *aURL)
|
||||
// make sure we have a trailing slash
|
||||
escPath += "/";
|
||||
}
|
||||
*aURL = nsCRT::strdup((const char *)escPath);
|
||||
*aURL = ToNewCString(escPath);
|
||||
rv = *aURL ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
}
|
||||
@ -1479,7 +1479,7 @@ NS_IMETHODIMP nsLocalFile::SetURL(const char * aURL)
|
||||
|
||||
nsUnescape((char*)path.get());
|
||||
|
||||
rv = InitWithPath(path);
|
||||
rv = InitWithPath(path.get());
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user