Bug 1059001 - Part 4: Pass encryption through via discovery. r=past
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 10 Dec 2014 20:55:52 -0600
changeset 219133 5fc8a787af0fcd015c0e883232920bec5c7736c7
parent 219132 40e8d75da54f24fc2f48361bdb5760d570f4d993
child 219134 aa53dedec65f9e30d54a8ddf7f4e319cc809cd9a
push id27956
push userkwierso@gmail.com
push dateFri, 12 Dec 2014 00:47:19 +0000
treeherdermozilla-central@32a2c5bd2f68 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspast
bugs1059001
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 1059001 - Part 4: Pass encryption through via discovery. r=past
browser/devtools/webide/modules/runtimes.js
toolkit/devtools/security/socket.js
--- a/browser/devtools/webide/modules/runtimes.js
+++ b/browser/devtools/webide/modules/runtimes.js
@@ -444,16 +444,17 @@ WiFiRuntime.prototype = {
   type: RuntimeTypes.WIFI,
   connect: function(connection) {
     let service = discovery.getRemoteService("devtools", this.deviceName);
     if (!service) {
       return promise.reject("Can't find device: " + this.name);
     }
     connection.host = service.host;
     connection.port = service.port;
+    connection.encryption = service.encryption;
     connection.connect();
     return promise.resolve();
   },
   get id() {
     return this.deviceName;
   },
   get name() {
     return this.deviceName;
--- a/toolkit/devtools/security/socket.js
+++ b/toolkit/devtools/security/socket.js
@@ -313,17 +313,20 @@ SocketListener.prototype = {
         }
         self._socket.initWithFilename(file, parseInt("666", 8), backlog);
       }
       yield self._setAdditionalSocketOptions();
       self._socket.asyncListen(self);
       dumpn("Socket listening on: " + (self.port || self.portOrPath));
     }).then(() => {
       if (this.discoverable && this.port) {
-        discovery.addService("devtools", { port: this.port });
+        discovery.addService("devtools", {
+          port: this.port,
+          encryption: this.encryption
+        });
       }
     }).catch(e => {
       dumpn("Could not start debugging listener on '" + this.portOrPath +
             "': " + e);
       this.close();
     });
   },