Bug 482809 Crash [@ jsds_SyncFilter(FilterRecord*, jsdIFilter*) ] when appendFilter() called with Console2 installed
authortimeless@mozdev.org
Thu, 12 Mar 2009 13:04:48 +0100
changeset 26087 d1835d161d78934c274409f69cc2509edacddb90
parent 26085 69322c1764ffd21bd5756e54a4068fcb4c4ac077 (current diff)
parent 26086 21d386fcfc1bd69b45f9542025616410396ca689 (diff)
child 26089 351ad44105f0202d38333c5f5dac7cf599d788f6
push id5891
push usertimeless@mozdev.org
push dateThu, 12 Mar 2009 09:48:14 +0000
treeherdermozilla-central@d1835d161d78 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
--- 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);