aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-09-02 22:10:26 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-09-18 15:06:40 -0400
commitc31e2f928d2b8b2ab870c652a03efec779dff268 (patch)
tree62f1ee15591270aaa3d841bd88d63a884d9c1fb0 /components/script/script_task.rs
parentbb9955c28132a0c6b2fa85187f6d4e1566d7db5e (diff)
downloadservo-c31e2f928d2b8b2ab870c652a03efec779dff268.tar.gz
servo-c31e2f928d2b8b2ab870c652a03efec779dff268.zip
Avoid selecting on the devtools port if no devtools server exists.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 02fa3d10921..2feb088201c 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -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() {