Introduce GlobalScope::new_script_pair

This commit is contained in:
Anthony Ramine 2016-10-05 09:40:04 +02:00
parent 1f8bb3a89f
commit cdf3ef05e7
3 changed files with 17 additions and 13 deletions

View file

@ -1297,7 +1297,7 @@ impl XMLHttpRequest {
let global_scope = global.as_global_scope();
let (script_chan, script_port) = if self.sync.get() {
let (tx, rx) = global.new_script_pair();
let (tx, rx) = global_scope.new_script_pair();
(tx, Some(rx))
} else {
(global_scope.networking_task_source(), None)