aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/node.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-02-04 11:07:48 +0100
committerMs2ger <ms2ger@gmail.com>2015-02-06 12:33:32 +0100
commit147dadce893c7bf156e1c7e067dde0ce584a6e9d (patch)
treedba8290821fca2f5f26551dbbea42fdd9232cab8 /components/script/dom/node.rs
parentf451291782030dd729e56372cf64b1a1412f9f6b (diff)
downloadservo-147dadce893c7bf156e1c7e067dde0ce584a6e9d.tar.gz
servo-147dadce893c7bf156e1c7e067dde0ce584a6e9d.zip
Implement an Unrooted smart pointer to replace JS when it is not traced.
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r--components/script/dom/node.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 860f03753e8..5bb79e827f0 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -23,7 +23,7 @@ use dom::bindings::conversions;
use dom::bindings::error::Fallible;
use dom::bindings::error::Error::{NotFound, HierarchyRequest, Syntax};
use dom::bindings::global::GlobalRef;
-use dom::bindings::js::{JS, JSRef, LayoutJS, RootedReference, Temporary, Root};
+use dom::bindings::js::{JS, JSRef, LayoutJS, RootedReference, Temporary, Root, Unrooted};
use dom::bindings::js::{TemporaryPushable, OptionalRootedRootable};
use dom::bindings::js::{ResultRootable, OptionalRootable, MutNullableJS};
use dom::bindings::trace::JSTraceable;
@@ -907,7 +907,7 @@ pub fn from_untrusted_node_address(runtime: *mut JSRuntime, candidate: Untrusted
panic!("Attempted to create a `JS<Node>` from an invalid pointer!")
}
let boxed_node: *const Node = conversions::unwrap(object);
- Temporary::new(JS::from_raw(boxed_node))
+ Temporary::from_unrooted(Unrooted::from_raw(boxed_node))
}
}