[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-patches
Subject:    patches: nsHTMLDocument.cpp and nsXIFConverter.cpp
From:       "Bruce Mitchener Jr." <bruce () cybersight ! com>
Date:       1999-03-28 15:21:45
[Download RAW message or body]

I couldn't see the reason for the operation removed from
nsHTMLDocument.cpp by this patch.  The patch for nsXIFConverter.cpp
fixes a delete[] vs delete issue.

 - Bruce

Index: layout/html/document/src/nsHTMLDocument.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/document/src/nsHTMLDocument.cpp,v
retrieving revision 3.99
diff -u -r3.99 nsHTMLDocument.cpp
--- nsHTMLDocument.cpp	1999/03/09 09:39:38	3.99
+++ nsHTMLDocument.cpp	1999/03/28 11:10:37
@@ -2645,9 +2645,6 @@
         contentStr.Cut(offset, mSearchStr->Length());
         contentStr.Insert(replacementStr, offset,
replacementStr.Length());
 
-        char * s = contentStr.ToNewCString();
-        delete[]s;
-
         nsIDOMNode * parent;
         node->GetParentNode(&parent);
 

Index: layout/base/src/nsXIFConverter.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/src/nsXIFConverter.cpp,v
retrieving revision 1.6
diff -u -r1.6 nsXIFConverter.cpp
--- nsXIFConverter.cpp	1999/03/15 05:10:02	1.6
+++ nsXIFConverter.cpp	1999/03/28 10:58:38
@@ -399,6 +399,6 @@
   char* s = mBuffer.ToNewCString();
   out << s;
   out.close();
-  delete s;
+  delete[] s;
 #endif
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic