diff options
author | marmeladema <xademax@gmail.com> | 2019-07-22 01:09:24 +0100 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-07-24 08:24:50 +0100 |
commit | 2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa (patch) | |
tree | c1c93f26ab047bb010d1781511a750a302cc5636 /components/script/dom/xmldocument.rs | |
parent | 808fa65aef163879b82baddc4af0a5445f806c81 (diff) | |
download | servo-2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa.tar.gz servo-2c5d0a6ebc39ad263e2bbe623e357a11b4cec5aa.zip |
Convert CGTraitInterface to use safe JSContext instead of raw JSContext
Diffstat (limited to 'components/script/dom/xmldocument.rs')
-rw-r--r-- | components/script/dom/xmldocument.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/components/script/dom/xmldocument.rs b/components/script/dom/xmldocument.rs index aeb088a6c77..73d7eee89c5 100644 --- a/components/script/dom/xmldocument.rs +++ b/components/script/dom/xmldocument.rs @@ -13,8 +13,8 @@ use crate::dom::document::{Document, DocumentSource, HasBrowsingContext, IsHTMLD use crate::dom::location::Location; use crate::dom::node::Node; use crate::dom::window::Window; +use crate::script_runtime::JSContext; use dom_struct::dom_struct; -use js::jsapi::JSContext; use js::jsapi::JSObject; use mime::Mime; use script_traits::DocumentActivity; @@ -106,13 +106,8 @@ impl XMLDocumentMethods for XMLDocument { self.upcast::<Document>().SupportedPropertyNames() } - #[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<NonNull<JSObject>> { + fn NamedGetter(&self, _cx: JSContext, name: DOMString) -> Option<NonNull<JSObject>> { self.upcast::<Document>().NamedGetter(_cx, name) } } |