aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/iterable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/bindings/iterable.rs')
-rw-r--r--components/script/dom/bindings/iterable.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/bindings/iterable.rs b/components/script/dom/bindings/iterable.rs
index 36cef24d4bd..0228e31caae 100644
--- a/components/script/dom/bindings/iterable.rs
+++ b/components/script/dom/bindings/iterable.rs
@@ -9,7 +9,6 @@
use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyAndValueResult;
use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValueResult;
use dom::bindings::error::Fallible;
-use dom::bindings::nonnull::NonNullJSObjectPtr;
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
use dom::bindings::root::{Dom, DomRoot};
use dom::bindings::trace::JSTraceable;
@@ -20,6 +19,7 @@ use js::jsapi::{HandleValue, Heap, JSContext, MutableHandleObject, JSObject};
use js::jsval::UndefinedValue;
use std::cell::Cell;
use std::ptr;
+use std::ptr::NonNull;
/// The values that an iterator will iterate over.
#[derive(JSTraceable, MallocSizeOf)]
@@ -73,7 +73,7 @@ impl<T: DomObject + JSTraceable + Iterable> IterableIterator<T> {
/// Return the next value from the iterable object.
#[allow(non_snake_case)]
- pub fn Next(&self, cx: *mut JSContext) -> Fallible<NonNullJSObjectPtr> {
+ pub fn Next(&self, cx: *mut JSContext) -> Fallible<NonNull<JSObject>> {
let index = self.index.get();
rooted!(in(cx) let mut value = UndefinedValue());
rooted!(in(cx) let mut rval = ptr::null_mut::<JSObject>());
@@ -106,7 +106,7 @@ impl<T: DomObject + JSTraceable + Iterable> IterableIterator<T> {
self.index.set(index + 1);
result.map(|_| {
assert!(!rval.is_null());
- unsafe { NonNullJSObjectPtr::new_unchecked(rval.get()) }
+ unsafe { NonNull::new_unchecked(rval.get()) }
})
}
}