Opened 3 years ago

#20102 new defect

use a data object for control port info

Reported by: mcs Owned by: tbb-team
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-torbutton
Cc: arthuredelstein, brade Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.

Child Tickets

Change History (0)

Note: See TracTickets for help on using tickets.