diff --git a/mozilla/xpcom/components/nsCategoryManager.cpp b/mozilla/xpcom/components/nsCategoryManager.cpp index c668c0c14ce..c41f8554bbb 100644 --- a/mozilla/xpcom/components/nsCategoryManager.cpp +++ b/mozilla/xpcom/components/nsCategoryManager.cpp @@ -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 diff --git a/mozilla/xpcom/components/nsNativeComponentLoader.cpp b/mozilla/xpcom/components/nsNativeComponentLoader.cpp index be370261c0e..433169083ac 100644 --- a/mozilla/xpcom/components/nsNativeComponentLoader.cpp +++ b/mozilla/xpcom/components/nsNativeComponentLoader.cpp @@ -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; diff --git a/mozilla/xpcom/io/nsFastLoadService.cpp b/mozilla/xpcom/io/nsFastLoadService.cpp index 26fd40bf3a3..7dcdde05381 100644 --- a/mozilla/xpcom/io/nsFastLoadService.cpp +++ b/mozilla/xpcom/io/nsFastLoadService.cpp @@ -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; diff --git a/mozilla/xpcom/io/nsLocalFileUnix.cpp b/mozilla/xpcom/io/nsLocalFileUnix.cpp index 5569364afa6..071394d2c47 100644 --- a/mozilla/xpcom/io/nsLocalFileUnix.cpp +++ b/mozilla/xpcom/io/nsLocalFileUnix.cpp @@ -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; }