diff options
author | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-09-13 17:11:24 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2017-09-13 17:11:24 +0200 |
commit | 82c58d0a05d2bf00bbb64fc83dd05469eeec5a43 (patch) | |
tree | b7b60e0160d0733da921e8ad00b878bcca8069ac /components/script/dom/htmllinkelement.rs | |
parent | 02d1264047c9aee63ae93c5624c591c42394690c (diff) | |
download | servo-82c58d0a05d2bf00bbb64fc83dd05469eeec5a43.tar.gz servo-82c58d0a05d2bf00bbb64fc83dd05469eeec5a43.zip |
script: Fix stylesheet adoption.
Diffstat (limited to 'components/script/dom/htmllinkelement.rs')
-rw-r--r-- | components/script/dom/htmllinkelement.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 963f570700a..f1a8242b345 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -242,8 +242,8 @@ impl VirtualMethods for HTMLLinkElement { s.unbind_from_tree(context); } - if let Some(ref s) = *self.stylesheet.borrow() { - document_from_node(self).remove_stylesheet(self.upcast(), s); + if let Some(s) = self.stylesheet.borrow_mut().take() { + document_from_node(self).remove_stylesheet(self.upcast(), &s); } } } |