Bug 508125 - add gc() in httpd.js, reduces memory by 1GB in xpcshell.exe during mochitest run. r=waldo a=test-only
☠☠ backed out by 0165ef8efe98 ☠ ☠
authorChris Pearce <chris@pearce.org.nz>
Thu, 30 Sep 2010 16:15:47 -0400
changeset 56371 3671178287951e2c122697f8675470b8736a17c1
parent 56370 4ca3a0191455be6ca5953e506b89b0bd1ab9a366
child 56372 24c51e16703af3a08347f976aba7f6cb7e0a294d
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswaldo, test-only
bugs508125
milestone2.0b8pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 508125 - add gc() in httpd.js, reduces memory by 1GB in xpcshell.exe during mochitest run. r=waldo a=test-only
netwerk/test/httpserver/httpd.js
--- a/netwerk/test/httpserver/httpd.js
+++ b/netwerk/test/httpserver/httpd.js
@@ -782,16 +782,20 @@ nsHttpServer.prototype =
     NS_ASSERT(this._connections[connection.number] === connection,
               "connection number mismatch?  " +
               this._connections[connection.number]);
     delete this._connections[connection.number];
 
     // Fire a pending server-stopped notification if it's our responsibility.
     if (!this._hasOpenConnections() && this._socketClosed)
       this._notifyStopped();
+    // Bug 508125: Add a GC here else we'll use gigabytes of memory running
+    // mochitests. We can't rely on xpcshell doing an automated GC, as that
+    // would interfere with testing GC stuff...
+    gc();
   },
 
   /**
    * Requests that the server be shut down when possible.
    */
   _requestQuit: function()
   {
     dumpn(">>> requesting a quit");