mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove Reflectable::global
This commit is contained in:
parent
e7a1149984
commit
907781eb75
8 changed files with 15 additions and 22 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue