Refactor StylesheetLoader so impls do not need to acquire a shared lock.

This fixes a deadlock:
https://github.com/servo/servo/pull/16014#issuecomment-287527067
This commit is contained in:
Simon Sapin 2017-03-18 13:49:04 +01:00
parent 1bacd0eb15
commit 1e38013783
4 changed files with 84 additions and 59 deletions

View file

@ -291,9 +291,8 @@ impl HTMLLinkElement {
// doesn't match.
let loader = StylesheetLoader::for_element(self.upcast());
loader.load(StylesheetContextSource::LinkElement {
url: url,
media: Some(media),
}, cors_setting, integrity_metadata.to_owned());
}, url, cors_setting, integrity_metadata.to_owned());
}
fn handle_favicon_url(&self, rel: &str, href: &str, sizes: &Option<String>) {