aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/js.rs
diff options
context:
space:
mode:
authorAneesh Agrawal <aneeshusa@gmail.com>2015-04-06 18:57:06 -0400
committerAneesh Agrawal <aneeshusa@gmail.com>2015-04-06 18:57:06 -0400
commit04468a53dff4c2aa9890a4e3527f26b99be07521 (patch)
treed5422cf4d204c66f6cc4151b7c998a1906263cce /components/script/dom/bindings/js.rs
parent3c5c2f416b6a0584758ac98c3d984288cad80aba (diff)
downloadservo-04468a53dff4c2aa9890a4e3527f26b99be07521.tar.gz
servo-04468a53dff4c2aa9890a4e3527f26b99be07521.zip
Don't consume self when calling root on a Temporary<T>.
Fixes issue #5540.
Diffstat (limited to 'components/script/dom/bindings/js.rs')
-rw-r--r--components/script/dom/bindings/js.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index 357a3282f9d..3529ffda5bc 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -173,7 +173,7 @@ impl<T: Reflectable> Temporary<T> {
}
/// Create a stack-bounded root for this value.
- pub fn root(self) -> Root<T> {
+ pub fn root(&self) -> Root<T> {
STACK_ROOTS.with(|ref collection| {
let RootCollectionPtr(collection) = collection.get().unwrap();
unsafe {