diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-29 00:35:17 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-08-30 19:07:13 +0200 |
commit | 6e1523f4ae61c16578a462c2e5335cbc95a6ef04 (patch) | |
tree | 61afce9c9fdf4d1158ce5836b155aa58ac0e19c8 /components/script/dom/xmldocument.rs | |
parent | 3e32948a39ced28c12f38ce115abcb56e67e72d9 (diff) | |
download | servo-6e1523f4ae61c16578a462c2e5335cbc95a6ef04.tar.gz servo-6e1523f4ae61c16578a462c2e5335cbc95a6ef04.zip |
Compile WebIDL return type "object" to NonZero<*mut JSObject>
Diffstat (limited to 'components/script/dom/xmldocument.rs')
-rw-r--r-- | components/script/dom/xmldocument.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs index 5f6b6e1919c..348fb4056cc 100644 --- a/components/script/dom/xmldocument.rs +++ b/components/script/dom/xmldocument.rs @@ -2,6 +2,7 @@ * 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}; @@ -87,7 +88,8 @@ impl XMLDocumentMethods for XMLDocument { } // https://html.spec.whatwg.org/multipage/#dom-tree-accessors:dom-document-nameditem-filter - fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString, found: &mut bool) -> *mut JSObject { + fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString, found: &mut bool) + -> NonZero<*mut JSObject> { self.upcast::<Document>().NamedGetter(_cx, name, found) } } |