Skip to content

Commit

Permalink
fix double borrowing of image request
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Jun 1, 2017
1 parent c018340 commit 5bf1105
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/script/dom/htmlimageelement.rs
Expand Up @@ -524,22 +524,20 @@ impl HTMLImageElement {
}
self.image_request.set(ImageRequestPhase::Pending);
self.init_image_request(&mut pending_request, &url, &src);
self.fetch_image(&url);
},
(_, State::Broken) | (_, State::Unavailable) => {
// Step 12.5
self.init_image_request(&mut current_request, &url, &src);
self.fetch_image(&url);
},
(_, _) => {
// step 12.6
self.image_request.set(ImageRequestPhase::Pending);
self.init_image_request(&mut pending_request, &url, &src);
self.fetch_image(&url);
},
}
}
}
self.fetch_image(&url);
}

/// Step 8-12 of html.spec.whatwg.org/multipage/#update-the-image-data
Expand Down

0 comments on commit 5bf1105

Please sign in to comment.