Bug 649564 - Make kill never take down the test, and add a missing callback. rs=ted
authorJosh Matthews <josh@joshmatthews.net>
Mon, 23 Jan 2012 13:28:55 -0500
changeset 86350 8f06957d69d9fe5e48e048d0995ecf4e4c3a0aa1
parent 86349 778cf04d7c553a03043a2e77cc52655c5cc48d5b
child 86351 5a315a55ea7e3380354d9fa7b84f7f28b4d7ff71
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs649564
milestone12.0a1
Bug 649564 - Make kill never take down the test, and add a missing callback. rs=ted
netwerk/test/unit/test_socks.js
--- a/netwerk/test/unit/test_socks.js
+++ b/netwerk/test/unit/test_socks.js
@@ -434,21 +434,31 @@ SocksTestServer.prototype = {
   onSocketAccepted: function(socket, trans)
   {
     print('server: got client connection');
     var input = trans.openInputStream(0, 0, 0);
     var output = trans.openOutputStream(0, 0, 0);
     var client = new SocksClient(this, input, output);
     this.client_connections.push(client);
   },
+  
+  onStopListening: function(socket)
+  {  
+  },
 
   close: function()
   {
     if (this.client_subprocess) {
-      this.client_subprocess.kill();
+      try {
+        this.client_subprocess.kill();      
+      } catch (x) {
+        do_print('Killing subprocess failed: ' + e);
+        if (x.stack)
+          _dump_exception_stack(x.stack);
+      }
       this.client_subprocess = null;
     }
     for each (var client in this.client_connections)
       client.close();
     this.client_connections = [];
     if (this.listener) {
       this.listener.close();
       this.listener = null;