mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Avoid selecting on the devtools port if no devtools server exists.
This commit is contained in:
parent
bb9955c281
commit
c31e2f928d
1 changed files with 5 additions and 3 deletions
|
@ -162,7 +162,7 @@ pub struct ScriptTask {
|
|||
compositor: Box<ScriptListener>,
|
||||
|
||||
/// For providing instructions to an optional devtools server.
|
||||
_devtools_chan: Option<DevtoolsControlChan>,
|
||||
devtools_chan: Option<DevtoolsControlChan>,
|
||||
/// For receiving commands from an optional devtools server. Will be ignored if
|
||||
/// no such server exists.
|
||||
devtools_port: DevtoolsControlPort,
|
||||
|
@ -332,7 +332,7 @@ impl ScriptTask {
|
|||
control_port: control_port,
|
||||
constellation_chan: constellation_chan,
|
||||
compositor: compositor,
|
||||
_devtools_chan: devtools_chan,
|
||||
devtools_chan: devtools_chan,
|
||||
devtools_port: devtools_receiver,
|
||||
|
||||
js_runtime: js_runtime,
|
||||
|
@ -430,7 +430,9 @@ impl ScriptTask {
|
|||
unsafe {
|
||||
port1.add();
|
||||
port2.add();
|
||||
port3.add();
|
||||
if self.devtools_chan.is_some() {
|
||||
port3.add();
|
||||
}
|
||||
}
|
||||
let ret = sel.wait();
|
||||
if ret == port1.id() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue