[tor-bugs] #20102 [Applications/Tor Browser]: use a data object for control port info

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Sep 7 21:11:30 UTC 2016


#20102: use a data object for control port info
------------------------------------------+---------------------------
     Reporter:  mcs                       |      Owner:  tbb-team
         Type:  defect                    |     Status:  new
     Priority:  Medium                    |  Milestone:
    Component:  Applications/Tor Browser  |    Version:
     Severity:  Normal                    |   Keywords:  tbb-torbutton
Actual Points:                            |  Parent ID:
       Points:                            |   Reviewer:
      Sponsor:                            |
------------------------------------------+---------------------------
 In ticket:14271#comment:16, arthuredelstein said:
 In torbutton.js, we will now have
 {{{
 var m_tb_control_socket_file = null; // Set if using a UNIX domain socket.
 var m_tb_control_port = null;        // Set if not using a socket.
 var m_tb_control_host = null;        // Set if not using a socket.
 var m_tb_control_pass = null;
 var m_tb_control_desc = null;
 }}}
 I imagine it might be cleaner to collect these into a single data object
 like
 {{{
 var m_tb_control = { socket_file, host, port, password, descriptor }
 }}}
 Then we could factor out a single factory function from torbutton_init()
 that generates this object. And we could use this object as a single
 argument for functions in tor-control-port.js and tor-circuit-display.js
 as well.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20102>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list