aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/serviceworkerregistration.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/serviceworkerregistration.rs')
-rw-r--r--components/script/dom/serviceworkerregistration.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/serviceworkerregistration.rs b/components/script/dom/serviceworkerregistration.rs
index bc089c18dac..09c23570243 100644
--- a/components/script/dom/serviceworkerregistration.rs
+++ b/components/script/dom/serviceworkerregistration.rs
@@ -57,13 +57,15 @@ impl ServiceWorkerRegistration {
pipeline_id: Some(global.pipeline_id())
};
- let worker_id = global.as_global_scope().get_next_worker_id();
+ let global_scope = global.as_global_scope();
+ let worker_id = global_scope.get_next_worker_id();
+ let devtools_chan = global_scope.devtools_chan().cloned();
let init = prepare_workerscope_init(global, None);
ScopeThings {
script_url: script_url,
init: init,
worker_load_origin: worker_load_origin,
- devtools_chan: global.devtools_chan(),
+ devtools_chan: devtools_chan,
worker_id: worker_id
}
}