Add global default method for Reflectable trait

This commit is contained in:
Chad Kimes 2016-01-10 23:08:55 -05:00
parent 2703568227
commit ce6075825d
17 changed files with 88 additions and 83 deletions

View file

@ -5,7 +5,6 @@
use dom::bindings::callback::ExceptionHandling::Report;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::FunctionBinding::Function;
use dom::bindings::global::global_root_from_reflector;
use dom::bindings::reflector::Reflectable;
use dom::bindings::trace::JSTraceable;
use dom::window::ScriptHelpers;
@ -289,7 +288,7 @@ impl ActiveTimers {
// step 14
match callback {
InternalTimerCallback::StringTimerCallback(code_str) => {
let cx = global_root_from_reflector(this).r().get_cx();
let cx = this.global().r().get_cx();
let mut rval = RootedValue::new(cx, UndefinedValue());
this.evaluate_js_on_global_with_result(&code_str, rval.handle_mut());