Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dead load_sync function. #8318

Merged
merged 1 commit into from Nov 4, 2015
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove dead load_sync function.

  • Loading branch information
eefriedman committed Nov 3, 2015
commit 193d8f2dba94c3b8edad34cf9f40cdf27daaeb63
@@ -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);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.