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 84381b52655..5a86dcf64d8 100644
--- a/components/script/dom/bindings/iterable.rs
+++ b/components/script/dom/bindings/iterable.rs
@@ -10,10 +10,10 @@ use core::nonzero::NonZero;
use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyAndValueResult;
use dom::bindings::codegen::Bindings::IterableIteratorBinding::IterableKeyOrValueResult;
use dom::bindings::error::Fallible;
-use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, Root};
use dom::bindings::reflector::{Reflector, Reflectable, MutReflectable, reflect_dom_object};
use dom::bindings::trace::JSTraceable;
+use dom::globalscope::GlobalScope;
use js::conversions::ToJSValConvertible;
use js::jsapi::{JSContext, JSObject, MutableHandleValue, MutableHandleObject, HandleValue};
use js::jsval::UndefinedValue;
@@ -85,7 +85,7 @@ impl<T: Reflectable + JSTraceable + Iterable> IterableIterator<T> {
/// Create a new iterator instance for the provided iterable DOM interface.
pub fn new(iterable: &T,
type_: IteratorType,
- wrap: fn(*mut JSContext, GlobalRef, Box<IterableIterator<T>>)
+ wrap: fn(*mut JSContext, &GlobalScope, Box<IterableIterator<T>>)
-> Root<Self>) -> Root<Self> {
let iterator = box IterableIterator {
reflector: Reflector::new(),
@@ -94,7 +94,7 @@ impl<T: Reflectable + JSTraceable + Iterable> IterableIterator<T> {
index: Cell::new(0),
};
let global = iterable.global();
- reflect_dom_object(iterator, global.r(), wrap)
+ reflect_dom_object(iterator, global.r().as_global_scope(), wrap)
}
/// Return the next value from the iterable object.