aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/dom/domparser.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2014-03-31 18:41:28 -0400
committerJosh Matthews <josh@joshmatthews.net>2014-05-03 14:18:30 -0400
commitd7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1 (patch)
treeefd1e7f7ec1dd30467c2a67306e1a639837abead /src/components/script/dom/domparser.rs
parentffdc3f5b32a345b88eed774848924e862d47c093 (diff)
downloadservo-d7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1.tar.gz
servo-d7b96db33ca8f2b8a162df38e0f00e95f5ea6fa1.zip
Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.
Diffstat (limited to 'src/components/script/dom/domparser.rs')
-rw-r--r--src/components/script/dom/domparser.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/dom/domparser.rs b/src/components/script/dom/domparser.rs
index d11c7270057..6d77273e11e 100644
--- a/src/components/script/dom/domparser.rs
+++ b/src/components/script/dom/domparser.rs
@@ -4,7 +4,7 @@
use dom::bindings::codegen::BindingDeclarations::DOMParserBinding;
use dom::bindings::codegen::BindingDeclarations::DOMParserBinding::SupportedTypeValues::{Text_html, Text_xml};
-use dom::bindings::js::{JS, JSRef, RootCollection};
+use dom::bindings::js::{JS, JSRef, RootCollection, Unrooted};
use dom::bindings::utils::{Reflector, Reflectable, reflect_dom_object};
use dom::bindings::error::{Fallible, FailureUnknown};
use dom::document::{Document, HTMLDocument, NonHTMLDocument};
@@ -25,19 +25,19 @@ impl DOMParser {
}
}
- pub fn new(owner: &JSRef<Window>) -> JS<DOMParser> {
+ pub fn new(owner: &JSRef<Window>) -> Unrooted<DOMParser> {
reflect_dom_object(~DOMParser::new_inherited(owner.unrooted()), owner,
DOMParserBinding::Wrap)
}
- pub fn Constructor(owner: &JSRef<Window>) -> Fallible<JS<DOMParser>> {
+ pub fn Constructor(owner: &JSRef<Window>) -> Fallible<Unrooted<DOMParser>> {
Ok(DOMParser::new(owner))
}
pub fn ParseFromString(&self,
_s: DOMString,
ty: DOMParserBinding::SupportedType)
- -> Fallible<JS<Document>> {
+ -> Fallible<Unrooted<Document>> {
let roots = RootCollection::new();
let owner = self.owner.root(&roots);
match ty {