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

@ -154,7 +154,7 @@ impl CompiledEventListener {
match *handler {
CommonEventHandler::ErrorEventHandler(ref handler) => {
if let Some(event) = event.downcast::<ErrorEvent>() {
let cx = object.global_scope().get_cx();
let cx = object.global().get_cx();
rooted!(in(cx) let error = event.Error(cx));
let return_value = handler.Call_(object,
EventOrString::String(event.Message()),
@ -200,7 +200,7 @@ impl CompiledEventListener {
CommonEventHandler::EventHandler(ref handler) => {
if let Ok(value) = handler.Call_(object, event, exception_handle) {
let cx = object.global_scope().get_cx();
let cx = object.global().get_cx();
rooted!(in(cx) let value = value);
let value = value.handle();
@ -498,7 +498,7 @@ impl EventTarget {
bubbles: EventBubbles,
cancelable: EventCancelable)
-> Root<Event> {
let event = Event::new(&self.global_scope(), Atom::from(name), bubbles, cancelable);
let event = Event::new(&self.global(), Atom::from(name), bubbles, cancelable);
event.fire(self);