Bug 482809 Crash [@ jsds_SyncFilter(FilterRecord*, jsdIFilter*) ] when appendFilter() called with Console2 installed
authortimeless@mozdev.org
Thu, 12 Mar 2009 12:31:34 +0100
changeset 26086 21d386fcfc1bd69b45f9542025616410396ca689
parent 23431 36f4da6e262aa45fe6ac8f2e70c2439d3a4c1d41
child 26087 d1835d161d78934c274409f69cc2509edacddb90
push idunknown
push userunknown
push dateunknown
bugs482809, 136292
milestone1.9.2a1pre
Bug 482809 Crash [@ jsds_SyncFilter(FilterRecord*, jsdIFilter*) ] when appendFilter() called with Console2 installed removing errant change that crept into rev 36f4da6e262a with the fix for bug 136292 r=roc
js/jsd/jsd_xpc.cpp
--- a/js/jsd/jsd_xpc.cpp
+++ b/js/jsd/jsd_xpc.cpp
@@ -2718,17 +2718,17 @@ jsdService::ClearProfileData ()
 
 NS_IMETHODIMP
 jsdService::InsertFilter (jsdIFilter *filter, jsdIFilter *after)
 {
     NS_ENSURE_ARG_POINTER (filter);
     if (jsds_FindFilter (filter))
         return NS_ERROR_INVALID_ARG;
 
-    FilterRecord *rec = new FilterRecord;
+    FilterRecord *rec = PR_NEWZAP (FilterRecord);
     if (!rec)
         return NS_ERROR_OUT_OF_MEMORY;
 
     if (!jsds_SyncFilter (rec, filter)) {
         PR_Free (rec);
         return NS_ERROR_FAILURE;
     }
     
@@ -2760,17 +2760,17 @@ jsdService::InsertFilter (jsdIFilter *fi
 }
 
 NS_IMETHODIMP
 jsdService::AppendFilter (jsdIFilter *filter)
 {
     NS_ENSURE_ARG_POINTER (filter);
     if (jsds_FindFilter (filter))
         return NS_ERROR_INVALID_ARG;
-    FilterRecord *rec = new FilterRecord;
+    FilterRecord *rec = PR_NEWZAP (FilterRecord);
 
     if (!jsds_SyncFilter (rec, filter)) {
         PR_Free (rec);
         return NS_ERROR_FAILURE;
     }
     
     if (gFilters) {
         PR_INSERT_BEFORE(&rec->links, &gFilters->links);