aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
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() {