mirror of
https://github.com/servo/servo.git
synced 2025-07-30 10:40:27 +01:00
Auto merge of #8318 - eefriedman:dead-sync-load, r=jdm
Remove dead load_sync function. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8318) <!-- Reviewable:end -->
This commit is contained in:
commit
50e0c36eeb
1 changed files with 1 additions and 9 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
use msg::constellation_msg::{PipelineId};
|
||||
use net_traits::AsyncResponseTarget;
|
||||
use net_traits::{Metadata, PendingAsyncLoad, ResourceTask, load_whole_resource};
|
||||
use net_traits::{PendingAsyncLoad, ResourceTask};
|
||||
use std::sync::Arc;
|
||||
use url::Url;
|
||||
|
||||
|
@ -78,14 +78,6 @@ impl DocumentLoader {
|
|||
pending.load_async(listener)
|
||||
}
|
||||
|
||||
/// Create, initiate, and await the response for a new network request.
|
||||
pub fn load_sync(&mut self, load: LoadType) -> Result<(Metadata, Vec<u8>), String> {
|
||||
self.blocking_loads.push(load.clone());
|
||||
let result = load_whole_resource(&self.resource_task, load.url().clone());
|
||||
self.finish_load(load);
|
||||
result
|
||||
}
|
||||
|
||||
/// Mark an in-progress network request complete.
|
||||
pub fn finish_load(&mut self, load: LoadType) {
|
||||
let idx = self.blocking_loads.iter().position(|unfinished| *unfinished == load);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue