mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Urlmageddon: Use refcounted urls more often.
This commit is contained in:
parent
f14e7339b5
commit
913c874cb5
161 changed files with 1044 additions and 718 deletions
|
@ -339,12 +339,12 @@ pub mod utils {
|
|||
use dom::window::Window;
|
||||
use ipc_channel::ipc;
|
||||
use net_traits::image_cache_thread::{ImageCacheChan, ImageResponse};
|
||||
use url::Url;
|
||||
use servo_url::ServoUrl;
|
||||
|
||||
pub fn request_image_from_cache(window: &Window, url: Url) -> ImageResponse {
|
||||
pub fn request_image_from_cache(window: &Window, url: ServoUrl) -> ImageResponse {
|
||||
let image_cache = window.image_cache_thread();
|
||||
let (response_chan, response_port) = ipc::channel().unwrap();
|
||||
image_cache.request_image(url, ImageCacheChan(response_chan), None);
|
||||
image_cache.request_image(url.into(), ImageCacheChan(response_chan), None);
|
||||
let result = response_port.recv().unwrap();
|
||||
result.image_response
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue