diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-17 14:30:23 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-10-19 09:36:56 +0200 |
commit | 822e6f0d48158950a3b9212b2b7e93478359b58c (patch) | |
tree | 850ba66e01757efe893a4a1f04cac41f2a63d506 /components/script/dom/domstringmap.rs | |
parent | ff0da2f6428a95c5f10f26d7b6b86c9608f494e1 (diff) | |
download | servo-822e6f0d48158950a3b9212b2b7e93478359b58c.tar.gz servo-822e6f0d48158950a3b9212b2b7e93478359b58c.zip |
Do not root DOMStringMap::element
Diffstat (limited to 'components/script/dom/domstringmap.rs')
-rw-r--r-- | components/script/dom/domstringmap.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/components/script/dom/domstringmap.rs b/components/script/dom/domstringmap.rs index cfa5a8e0a1c..95f727c93cb 100644 --- a/components/script/dom/domstringmap.rs +++ b/components/script/dom/domstringmap.rs @@ -37,20 +37,17 @@ impl DOMStringMap { impl DOMStringMapMethods for DOMStringMap { // https://html.spec.whatwg.org/multipage/#dom-domstringmap-removeitem fn NamedDeleter(&self, name: DOMString) { - let element = self.element.root(); - element.r().delete_custom_attr(name) + self.element.delete_custom_attr(name) } // https://html.spec.whatwg.org/multipage/#dom-domstringmap-setitem fn NamedSetter(&self, name: DOMString, value: DOMString) -> ErrorResult { - let element = self.element.root(); - element.r().set_custom_attr(name, value) + self.element.set_custom_attr(name, value) } // https://html.spec.whatwg.org/multipage/#dom-domstringmap-nameditem fn NamedGetter(&self, name: DOMString, found: &mut bool) -> DOMString { - let element = self.element.root(); - match element.r().get_custom_attr(name) { + match self.element.get_custom_attr(name) { Some(value) => { *found = true; value.clone() |