aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/attr.rs
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2015-10-14 17:48:28 -0700
committerEli Friedman <eli.friedman@gmail.com>2015-10-15 14:03:56 -0700
commit57584e74c6fc192335ed3300ac75751bada0ff93 (patch)
treea75b0f9045238a8720e31d848433635222a06b58 /components/script/dom/attr.rs
parent7a08b29201d7a6ec8fd2097fc60ca47e556898d5 (diff)
downloadservo-57584e74c6fc192335ed3300ac75751bada0ff93.tar.gz
servo-57584e74c6fc192335ed3300ac75751bada0ff93.zip
Make get() and set() on MutNullableHeap use the correct types.
get() must always return a rooted value, because we have no way of ensuring the value won't be invalidated. set() takes an &T because it's convenient; there isn't any need to expose JS<T>.
Diffstat (limited to 'components/script/dom/attr.rs')
-rw-r--r--components/script/dom/attr.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/attr.rs b/components/script/dom/attr.rs
index 465ed0f4042..e4241f713ad 100644
--- a/components/script/dom/attr.rs
+++ b/components/script/dom/attr.rs
@@ -315,7 +315,7 @@ impl Attr {
}
(old, new) => assert!(old == new)
}
- self.owner.set(owner.map(JS::from_ref))
+ self.owner.set(owner);
}
pub fn owner(&self) -> Option<Root<Element>> {