diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2015-04-06 18:57:06 -0400 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2015-04-06 18:57:06 -0400 |
commit | 04468a53dff4c2aa9890a4e3527f26b99be07521 (patch) | |
tree | d5422cf4d204c66f6cc4151b7c998a1906263cce /components/script/dom/bindings/js.rs | |
parent | 3c5c2f416b6a0584758ac98c3d984288cad80aba (diff) | |
download | servo-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.rs | 2 |
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 { |