Bug 1058997 - Part 2: Debugger socket style cleanup. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 01 Dec 2014 22:55:56 -0800
changeset 218277 a2b8e1d6671b6531ff6dfe28a61157519f33908d
parent 218276 bd30fe30ca9c6cc76227faa43451add8a5c58609
child 218278 3cbc342103f567937d5c249e2722ccd8549980b0
push id27926
push usercbook@mozilla.com
push dateWed, 03 Dec 2014 12:39:10 +0000
treeherdermozilla-central@a9fc46355661 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs1058997
milestone37.0a1
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 1058997 - Part 2: Debugger socket style cleanup. r=past
toolkit/devtools/security/socket.js
--- a/toolkit/devtools/security/socket.js
+++ b/toolkit/devtools/security/socket.js
@@ -31,24 +31,23 @@ DevToolsUtils.defineLazyGetter(this, "ns
 DevToolsUtils.defineLazyGetter(this, "socketTransportService", () => {
   return Cc["@mozilla.org/network/socket-transport-service;1"]
          .getService(Ci.nsISocketTransportService);
 });
 
 /**
  * Connects to a debugger server socket and returns a DebuggerTransport.
  *
- * @param aHost string
+ * @param host string
  *        The host name or IP address of the debugger server.
- * @param aPort number
+ * @param port number
  *        The port number of the debugger server.
  */
-function socketConnect(aHost, aPort)
-{
-  let s = socketTransportService.createTransport(null, 0, aHost, aPort, null);
+function socketConnect(host, port) {
+  let s = socketTransportService.createTransport(null, 0, host, port, null);
   // By default the CONNECT socket timeout is very long, 65535 seconds,
   // so that if we race to be in CONNECT state while the server socket is still
   // initializing, the connection is stuck in connecting state for 18.20 hours!
   s.setTimeout(Ci.nsISocketTransport.TIMEOUT_CONNECT, 2);
 
   // openOutputStream may throw NS_ERROR_NOT_INITIALIZED if we hit some race
   // where the nsISocketTransport gets shutdown in between its instantiation and
   // the call to this method.
@@ -126,31 +125,31 @@ SocketListener.prototype = {
       return null;
     }
     return this._socket.port;
   },
 
   // nsIServerSocketListener implementation
 
   onSocketAccepted:
-  DevToolsUtils.makeInfallible(function(aSocket, aTransport) {
+  DevToolsUtils.makeInfallible(function(socket, socketTransport) {
     if (Services.prefs.getBoolPref("devtools.debugger.prompt-connection") &&
         !this._server._allowConnection()) {
       return;
     }
     dumpn("New debugging connection on " +
-          aTransport.host + ":" + aTransport.port);
+          socketTransport.host + ":" + socketTransport.port);
 
-    let input = aTransport.openInputStream(0, 0, 0);
-    let output = aTransport.openOutputStream(0, 0, 0);
+    let input = socketTransport.openInputStream(0, 0, 0);
+    let output = socketTransport.openOutputStream(0, 0, 0);
     let transport = new DebuggerTransport(input, output);
     this._server._onConnection(transport);
   }, "SocketListener.onSocketAccepted"),
 
-  onStopListening: function(aSocket, status) {
+  onStopListening: function(socket, status) {
     dumpn("onStopListening, status: " + status);
   }
 
 };
 
 // TODO: These high-level entry points will branch based on TLS vs. bare TCP as
 // part of bug 1059001.
 exports.DebuggerSocket = {