mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Allow to specify port with --devtools option (fixes #3597)
Note that using `servo --devtools http://example.org` doesn't work. In that case either the port must be specified or the option moved to the end. This is done by getopts and is the same for other such options, e.g. `--profile`.
This commit is contained in:
parent
94731270df
commit
8a5c6a0d3b
4 changed files with 21 additions and 19 deletions
|
@ -95,11 +95,9 @@ pub fn run(opts: opts::Opts) {
|
|||
let (compositor_port, compositor_chan) = CompositorChan::new();
|
||||
let time_profiler_chan = TimeProfiler::create(opts.time_profiler_period);
|
||||
let memory_profiler_chan = MemoryProfiler::create(opts.memory_profiler_period);
|
||||
let devtools_chan = if opts.devtools_server {
|
||||
Some(devtools::start_server())
|
||||
} else {
|
||||
None
|
||||
};
|
||||
let devtools_chan = opts.devtools_port.map(|port| {
|
||||
devtools::start_server(port)
|
||||
});
|
||||
|
||||
let opts_clone = opts.clone();
|
||||
let time_profiler_chan_clone = time_profiler_chan.clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue