Replace RwLock<MediaList> with shared_lock::Locked<MediaList>

This commit is contained in:
Simon Sapin 2017-03-14 16:09:41 +01:00
parent 8feb9e8047
commit c5a7294e05
18 changed files with 117 additions and 42 deletions

View file

@ -152,12 +152,14 @@ impl FetchResponseListener for StylesheetContext {
let is_stylesheet_load_applicable =
self.request_generation_id.map_or(true, |gen| gen == link.get_request_generation_id());
if is_stylesheet_load_applicable {
let shared_lock = document.style_shared_lock().clone();
let sheet =
Arc::new(Stylesheet::from_bytes(&data, final_url,
protocol_encoding_label,
Some(environment_encoding),
Origin::Author,
media.take().unwrap(),
shared_lock,
Some(&loader),
win.css_error_reporter(),
ParserContextExtraData::default()));