Remove Reflectable::global

This commit is contained in:
Anthony Ramine 2016-10-05 09:56:57 +02:00
parent e7a1149984
commit 907781eb75
8 changed files with 15 additions and 22 deletions

View file

@ -154,8 +154,7 @@ impl CompiledEventListener {
match *handler {
CommonEventHandler::ErrorEventHandler(ref handler) => {
if let Some(event) = event.downcast::<ErrorEvent>() {
let global = object.global();
let cx = global.r().get_cx();
let cx = object.global_scope().get_cx();
rooted!(in(cx) let error = event.Error(cx));
let return_value = handler.Call_(object,
EventOrString::String(event.Message()),
@ -201,8 +200,7 @@ impl CompiledEventListener {
CommonEventHandler::EventHandler(ref handler) => {
if let Ok(value) = handler.Call_(object, event, exception_handle) {
let global = object.global();
let cx = global.r().get_cx();
let cx = object.global_scope().get_cx();
rooted!(in(cx) let value = value);
let value = value.handle();