aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/webdriver_handlers.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-10-03 18:39:03 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-10-06 21:35:46 +0200
commitbad49e46964915afeac3aab4f7de9a9d6c2c55c6 (patch)
treec811eda23275a494a03c3288096a8147486f5bd5 /components/script/webdriver_handlers.rs
parent86d2008137f48432ba14aed5009775cfd4dadcc5 (diff)
downloadservo-bad49e46964915afeac3aab4f7de9a9d6c2c55c6.tar.gz
servo-bad49e46964915afeac3aab4f7de9a9d6c2c55c6.zip
Introduce GlobalScope::resource_threads
Diffstat (limited to 'components/script/webdriver_handlers.rs')
-rw-r--r--components/script/webdriver_handlers.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/webdriver_handlers.rs b/components/script/webdriver_handlers.rs
index 870b3235d38..95e300b1527 100644
--- a/components/script/webdriver_handlers.rs
+++ b/components/script/webdriver_handlers.rs
@@ -209,7 +209,7 @@ pub fn handle_get_cookies(context: &BrowsingContext,
let document = context.active_document();
let url = document.url();
let (sender, receiver) = ipc::channel().unwrap();
- let _ = document.window().resource_threads().send(
+ let _ = document.window().upcast::<GlobalScope>().resource_threads().send(
GetCookiesDataForUrl(url.clone(), sender, NonHTTP)
);
let cookies = receiver.recv().unwrap();
@@ -224,7 +224,7 @@ pub fn handle_get_cookie(context: &BrowsingContext,
let document = context.active_document();
let url = document.url();
let (sender, receiver) = ipc::channel().unwrap();
- let _ = document.window().resource_threads().send(
+ let _ = document.window().upcast::<GlobalScope>().resource_threads().send(
GetCookiesDataForUrl(url.clone(), sender, NonHTTP)
);
let cookies = receiver.recv().unwrap();
@@ -246,13 +246,13 @@ pub fn handle_add_cookie(context: &BrowsingContext,
reply.send(match (document.is_cookie_averse(), cookie.domain.clone()) {
(true, _) => Err(WebDriverCookieError::InvalidDomain),
(false, Some(ref domain)) if url.host_str().map(|x| { x == &**domain }).unwrap_or(false) => {
- let _ = document.window().resource_threads().send(
+ let _ = document.window().upcast::<GlobalScope>().resource_threads().send(
SetCookiesForUrlWithData(url.clone(), cookie, method)
);
Ok(())
},
(false, None) => {
- let _ = document.window().resource_threads().send(
+ let _ = document.window().upcast::<GlobalScope>().resource_threads().send(
SetCookiesForUrlWithData(url.clone(), cookie, method)
);
Ok(())