From 04468a53dff4c2aa9890a4e3527f26b99be07521 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Mon, 6 Apr 2015 18:57:06 -0400 Subject: [PATCH] Don't consume self when calling root on a Temporary. Fixes issue #5540. --- components/script/dom/bindings/js.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 Temporary { } /// Create a stack-bounded root for this value. - pub fn root(self) -> Root { + pub fn root(&self) -> Root { STACK_ROOTS.with(|ref collection| { let RootCollectionPtr(collection) = collection.get().unwrap(); unsafe {