mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace NonNullJSObjectPtr with std::ptr::NonNull<JSObject>
This commit is contained in:
parent
897a5b39c5
commit
52eda6082f
22 changed files with 79 additions and 111 deletions
|
@ -6,7 +6,6 @@ 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;
|
||||
|
@ -16,8 +15,10 @@ use dom::node::Node;
|
|||
use dom::window::Window;
|
||||
use dom_struct::dom_struct;
|
||||
use js::jsapi::JSContext;
|
||||
use js::jsapi::JSObject;
|
||||
use script_traits::DocumentActivity;
|
||||
use servo_url::{MutableOrigin, ServoUrl};
|
||||
use std::ptr::NonNull;
|
||||
|
||||
// https://dom.spec.whatwg.org/#xmldocument
|
||||
#[dom_struct]
|
||||
|
@ -101,7 +102,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<NonNullJSObjectPtr> {
|
||||
unsafe fn NamedGetter(&self, _cx: *mut JSContext, name: DOMString) -> Option<NonNull<JSObject>> {
|
||||
self.upcast::<Document>().NamedGetter(_cx, name)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue