Followup to bug 538918 - Don't leak gNeuteredWindows, r=jimm
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 10 Feb 2010 17:18:19 -0500
changeset 46655 1d9c3e67a2ac563d59f392c862bd78423a2e65a7
parent 46654 45dcc1e10d76e1f41d4e30ad9562aaef5869f91f
child 46656 109e2d8b095d32f697c06b0e0820a11c1bb1237a
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjimm
bugs538918
milestone1.9.3a2pre
Followup to bug 538918 - Don't leak gNeuteredWindows, r=jimm
ipc/glue/WindowsMessageLoop.cpp
--- a/ipc/glue/WindowsMessageLoop.cpp
+++ b/ipc/glue/WindowsMessageLoop.cpp
@@ -496,16 +496,18 @@ UnhookNeuteredWindows()
 {
   if (!gNeuteredWindows)
     return;
   PRUint32 count = gNeuteredWindows->Length();
   for (PRUint32 index = 0; index < count; index++) {
     RestoreWindowProcedure(gNeuteredWindows->ElementAt(index));
   }
   gNeuteredWindows->Clear();
+  delete gNeuteredWindows;
+  gNeuteredWindows = NULL;
 }
 
 void
 Init()
 {
   // If we aren't setup before a call to NotifyWorkerThread, we'll hang
   // on startup.
   if (!gUIThreadId) {