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

Simplify fetching code. #13571

Merged
merged 6 commits into from Oct 4, 2016
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Remove Document::add_blocking_load.

  • Loading branch information
Ms2ger committed Oct 4, 2016
commit aa48ec76287e6951a9a60089bf3d683d796d3af6
@@ -63,7 +63,7 @@ pub struct LoadBlocker {
impl LoadBlocker {
/// Mark the document's load event as blocked on this new load.
pub fn new(doc: &Document, load: LoadType) -> LoadBlocker {
doc.add_blocking_load(load.clone());
doc.mut_loader().add_blocking_load(load.clone());
LoadBlocker {
doc: JS::from_ref(doc),
load: Some(load),
@@ -119,7 +119,7 @@ impl DocumentLoader {
}

/// Add a load to the list of blocking loads.
pub fn add_blocking_load(&mut self, load: LoadType) {
fn add_blocking_load(&mut self, load: LoadType) {
self.blocking_loads.push(load);
}

@@ -1423,12 +1423,6 @@ impl Document {
ReflowReason::RequestAnimationFrame);
}

/// Add a load to the list of loads blocking this document's load.
pub fn add_blocking_load(&self, load: LoadType) {
let mut loader = self.loader.borrow_mut();
loader.add_blocking_load(load)
}

pub fn load_async(&self, load: LoadType, listener: AsyncResponseTarget, referrer_policy: Option<ReferrerPolicy>) {
let mut loader = self.loader.borrow_mut();
loader.load_async(load, listener, self, referrer_policy);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.