diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-19 19:15:08 -0700 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-05-19 19:15:08 -0700 |
commit | bcea0ada27de694cd0c465d04fd35eba70503d62 (patch) | |
tree | 9a604ff41983c9bded331f4ec80f94c9f6b1cd45 /components/script/dom/document.rs | |
parent | 051a749e0d0ff298a3cbce8c6284386dc0d67f24 (diff) | |
parent | a51db4cfa857d7567ce1078830f5c00ea7bd9f59 (diff) | |
download | servo-bcea0ada27de694cd0c465d04fd35eba70503d62.tar.gz servo-bcea0ada27de694cd0c465d04fd35eba70503d62.zip |
Auto merge of #11189 - izgzhen:refactor-resource-thread, r=nox
Refactor resource thread code
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it is refactoring
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11189)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/document.rs')
-rw-r--r-- | components/script/dom/document.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/document.rs b/components/script/dom/document.rs index f6000e28a8b..ddf23297282 100644 --- a/components/script/dom/document.rs +++ b/components/script/dom/document.rs @@ -96,11 +96,11 @@ use layout_interface::{LayoutChan, Msg, ReflowQueryType}; use msg::constellation_msg::{ALT, CONTROL, SHIFT, SUPER}; use msg::constellation_msg::{Key, KeyModifiers, KeyState}; use msg::constellation_msg::{PipelineId, ReferrerPolicy, SubpageId}; -use net_traits::ControlMsg::{GetCookiesForUrl, SetCookiesForUrl}; use net_traits::CookieSource::NonHTTP; +use net_traits::CoreResourceMsg::{GetCookiesForUrl, SetCookiesForUrl}; use net_traits::response::HttpsState; -use net_traits::{AsyncResponseTarget, PendingAsyncLoad}; -use num_traits::ToPrimitive; +use net_traits::{AsyncResponseTarget, PendingAsyncLoad, IpcSend}; +use num_traits::{ToPrimitive}; use origin::Origin; use parse::{ParserRoot, ParserRef, MutNullableParserField}; use script_thread::{MainThreadScriptMsg, Runnable}; @@ -2570,7 +2570,7 @@ impl DocumentMethods for Document { let url = self.url(); let (tx, rx) = ipc::channel().unwrap(); - let _ = self.window.resource_thread().send(GetCookiesForUrl((*url).clone(), tx, NonHTTP)); + let _ = self.window.resource_threads().send(GetCookiesForUrl((*url).clone(), tx, NonHTTP)); let cookies = rx.recv().unwrap(); Ok(cookies.map_or(DOMString::new(), DOMString::from)) } @@ -2587,7 +2587,7 @@ impl DocumentMethods for Document { let url = self.url(); let _ = self.window - .resource_thread() + .resource_threads() .send(SetCookiesForUrl((*url).clone(), String::from(cookie), NonHTTP)); Ok(()) } |