Move JS evaluation functions to GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-04 01:15:43 +02:00
parent 19108aa330
commit 9c04eb60bd
7 changed files with 67 additions and 71 deletions

View file

@ -489,11 +489,11 @@ impl JsTimerTask {
// step 4.2
match *&self.callback {
InternalTimerCallback::StringTimerCallback(ref code_str) => {
let global = this.global();
let cx = global.r().get_cx();
let global = this.global_scope();
let cx = global.get_cx();
rooted!(in(cx) let mut rval = UndefinedValue());
global.r().evaluate_js_on_global_with_result(
global.evaluate_js_on_global_with_result(
code_str, rval.handle_mut());
},
InternalTimerCallback::FunctionTimerCallback(ref function, ref arguments) => {