Rename Reflectable::global_scope to global

This commit is contained in:
Anthony Ramine 2016-10-05 11:06:25 +02:00
parent b6bbd41e11
commit d8e92bb271
37 changed files with 151 additions and 151 deletions

View file

@ -3170,7 +3170,7 @@ class CGCallGenerator(CGThing):
if static:
glob = "&global"
else:
glob = "&this.global_scope()"
glob = "&this.global()"
self.cgRoot.append(CGGeneric(
"let result = match result {\n"

View file

@ -93,7 +93,7 @@ impl<T: Reflectable + JSTraceable + Iterable> IterableIterator<T> {
iterable: JS::from_ref(iterable),
index: Cell::new(0),
};
reflect_dom_object(iterator, &*iterable.global_scope(), wrap)
reflect_dom_object(iterator, &*iterable.global(), wrap)
}
/// Return the next value from the iterable object.

View file

@ -80,7 +80,7 @@ pub trait Reflectable {
fn reflector(&self) -> &Reflector;
/// Returns the global scope of the realm that the Reflectable was created in.
fn global_scope(&self) -> Root<GlobalScope> where Self: Sized {
fn global(&self) -> Root<GlobalScope> where Self: Sized {
GlobalScope::from_reflector(self)
}
}