aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xmldocument.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2017-10-14 12:54:57 +0200
committerSimon Sapin <simon.sapin@exyr.org>2017-10-16 20:19:56 +0200
commite2fafd2dfc7a1b66fb224c83e15042d8f6d595c0 (patch)
tree51fa54657e9b0dddc4a0e1f6dc660c8943284335 /components/script/dom/xmldocument.rs
parent115d859551323c821beb412d550c6dacbcdd5e23 (diff)
downloadservo-e2fafd2dfc7a1b66fb224c83e15042d8f6d595c0.tar.gz
servo-e2fafd2dfc7a1b66fb224c83e15042d8f6d595c0.zip
Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.
Diffstat (limited to 'components/script/dom/xmldocument.rs')
-rw-r--r--components/script/dom/xmldocument.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs
index a74cb88af6b..acbdea33582 100644
--- a/components/script/dom/xmldocument.rs
+++ b/components/script/dom/xmldocument.rs
@@ -2,11 +2,11 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use core::nonzero::NonZero;
use document_loader::DocumentLoader;
use dom::bindings::codegen::Bindings::DocumentBinding::DocumentMethods;
use dom::bindings::codegen::Bindings::XMLDocumentBinding::{self, XMLDocumentMethods};
use dom::bindings::inheritance::Castable;
+use dom::bindings::nonnull::NonNullJSObjectPtr;
use dom::bindings::reflector::reflect_dom_object;
use dom::bindings::root::DomRoot;
use dom::bindings::str::DOMString;
@@ -15,7 +15,7 @@ use dom::location::Location;
use dom::node::Node;
use dom::window::Window;
use dom_struct::dom_struct;
-use js::jsapi::{JSContext, JSObject};
+use js::jsapi::JSContext;
use script_traits::DocumentActivity;
use servo_url::{MutableOrigin, ServoUrl};
@@ -100,7 +100,7 @@ impl XMLDocumentMethods for XMLDocument {
#[allow(unsafe_code)]
// https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter
- unsafe fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString) -> Option<NonZero<*mut JSObject>> {
+ unsafe fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString) -> Option<NonNullJSObjectPtr> {
self.upcast::<Document>().NamedGetter(_cx, name)
}
}