Bug 375878 remove users of Recycle()patch by taras glek r+sr=biesi
authorcbiesinger@web.de
Fri, 30 Mar 2007 15:44:22 -0700
changeset 241 22e1cff0f06d7e9d222c77602212fc441a868324
parent 240 403f7d61be4ef7dba3ab31677f92772a9af2568f
child 242 9f718ffcf0e2a6bb626806090c43d90285e41cdf
push idunknown
push userunknown
push dateunknown
bugs375878
milestone1.9a4pre
Bug 375878 remove users of Recycle()patch by taras glek r+sr=biesi
editor/libeditor/html/nsHTMLEditor.cpp
netwerk/streamconv/converters/nsDirIndexParser.cpp
rdf/datasource/src/nsFileSystemDataSource.cpp
security/manager/ssl/src/nsNSSCallbacks.cpp
xpinstall/src/nsInstallExecute.cpp
xpinstall/src/nsInstallFile.cpp
xpinstall/src/nsInstallUninstall.cpp
xpinstall/src/nsJSInstall.cpp
--- a/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/editor/libeditor/html/nsHTMLEditor.cpp
@@ -608,17 +608,17 @@ nsHTMLEditor::NodeIsBlockStatic(nsIDOMNo
 
       nsAutoString tagName;
       rv = element->GetTagName(tagName);
       if (NS_FAILED(rv)) return rv;
 
       assertmsg.Append(tagName);
       char* assertstr = ToNewCString(assertmsg);
       NS_ASSERTION(*aIsBlock, assertstr);
-      Recycle(assertstr);
+      NS_Free(assertstr);
     }
   }
 #endif /* DEBUG */
 
   return rv;
 #else /* USE_PARSER_FOR_BLOCKNESS */
   nsresult result = NS_ERROR_FAILURE;
   *aIsBlock = PR_FALSE;
--- a/netwerk/streamconv/converters/nsDirIndexParser.cpp
+++ b/netwerk/streamconv/converters/nsDirIndexParser.cpp
@@ -297,17 +297,17 @@ nsDirIndexParser::ParseData(nsIDirIndex 
         if (NS_SUCCEEDED(rv = gTextToSubURI->UnEscapeAndConvert(mEncoding.get(), filename.get(),
                                                                 &result)) && (result)) {
           if (*result) {
             aIdx->SetLocation(filename.get());
             if (!mHasDescription)
               aIdx->SetDescription(result);
             success = PR_TRUE;
           }
-          Recycle(result);
+          NS_Free(result);
         } else {
           NS_WARNING("UnEscapeAndConvert error");
         }
       }
       
       if (success == PR_FALSE) {
         // if unsuccessfully at charset conversion, then
         // just fallback to unescape'ing in-place
--- a/rdf/datasource/src/nsFileSystemDataSource.cpp
+++ b/rdf/datasource/src/nsFileSystemDataSource.cpp
@@ -1139,17 +1139,17 @@ FileSystemDataSource::GetFolderList(nsIR
 
         char    *escLeafStr = nsEscape(NS_ConvertUTF16toUTF8(leafStr).get(), url_Path);
         leafStr.Truncate();
 
         if (!escLeafStr)
             continue;
   
         nsCAutoString           leaf(escLeafStr);
-        Recycle(escLeafStr);
+        NS_Free(escLeafStr);
         escLeafStr = nsnull;
 
         // using nsEscape() [above] doesn't escape slashes, so do that by hand
         PRInt32         aOffset;
         while ((aOffset = leaf.FindChar('/')) >= 0)
         {
             leaf.Cut((PRUint32)aOffset, 1);
             leaf.Insert("%2F", (PRUint32)aOffset);
--- a/security/manager/ssl/src/nsNSSCallbacks.cpp
+++ b/security/manager/ssl/src/nsNSSCallbacks.cpp
@@ -775,17 +775,17 @@ PK11PasswordPrompt(PK11SlotInfo* slot, P
     else {
       rv = proxyPrompt->PromptPassword(nsnull, promptString.get(),
                                        &password, nsnull, nsnull, &value);
     }
   }
   
   if (NS_SUCCEEDED(rv) && value) {
     char* str = ToNewUTF8String(nsDependentString(password));
-    Recycle(password);
+    NS_Free(password);
     return str;
   }
 
   return nsnull;
 }
 
 void PR_CALLBACK HandshakeCallback(PRFileDesc* fd, void* client_data) {
   nsNSSShutDownPreventionLock locker;
--- a/xpinstall/src/nsInstallExecute.cpp
+++ b/xpinstall/src/nsInstallExecute.cpp
@@ -234,17 +234,17 @@ PRInt32 nsInstallExecute::Complete()
       }
       else
          rv = nsInstall::EXECUTION_ERROR;
    }
    else
       rv = nsInstall::UNEXPECTED_ERROR;
 
    if(arguments)
-      Recycle(arguments);
+      NS_Free(arguments);
 
    return rv;
 }
 
 void nsInstallExecute::Abort()
 {
     /* Get the names */
     if (mExecutableFile == nsnull) 
@@ -270,17 +270,17 @@ char* nsInstallExecute::toString()
 
         if (rsrcVal)
         {
             sprintf( buffer, rsrcVal, tempString);
             nsCRT::free(rsrcVal);
         }
         
         if (tempString)
-            Recycle(tempString);
+            NS_Free(tempString);
     }
     else
     {
         rsrcVal = mInstall->GetResourcedString(NS_LITERAL_STRING("Execute"));
 
         if (rsrcVal)
         {
             nsCAutoString temp;
--- a/xpinstall/src/nsInstallFile.cpp
+++ b/xpinstall/src/nsInstallFile.cpp
@@ -378,19 +378,19 @@ char* nsInstallFile::toString()
 
         if(interimCStr)
         {
             nsCAutoString fname;
             if (mFinalFile)
                 mFinalFile->GetNativePath(fname);
 
             PR_snprintf( buffer, RESBUFSIZE, interimCStr, fname.get() );
-            Recycle(interimCStr);
+            NS_Free(interimCStr);
         }
-        Recycle(rsrcVal);
+        NS_Free(rsrcVal);
     }
 
     return buffer;
 }
 
 
 PRInt32 nsInstallFile::CompleteFileMove()
 {
--- a/xpinstall/src/nsInstallUninstall.cpp
+++ b/xpinstall/src/nsInstallUninstall.cpp
@@ -128,17 +128,17 @@ char* nsInstallUninstall::toString()
         if (rsrcVal)
         {
             sprintf( buffer, rsrcVal, temp);
             nsCRT::free(rsrcVal);
         }
     }
 
     if (temp)
-         Recycle(temp);
+         NS_Free(temp);
 
     return buffer;
 }
 
 
 PRBool
 nsInstallUninstall::CanUninstall()
 {
--- a/xpinstall/src/nsJSInstall.cpp
+++ b/xpinstall/src/nsJSInstall.cpp
@@ -1564,17 +1564,17 @@ InstallTRACE(JSContext *cx, JSObject *ob
   nsAutoString b0;
 
   ConvertJSValToStr(b0, cx, argv[0]);
 
   char *tempStr;
   tempStr = ToNewCString(b0);
   printf("Install:\t%s\n", tempStr);
 
-  Recycle(tempStr);
+  NS_Free(tempStr);
 
   return JS_TRUE;
 }
 
 /*END HACK FOR DEBUGGING UNTIL ALERTS WORK*/
 
 
 //