mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Move JS evaluation functions to GlobalScope
This commit is contained in:
parent
19108aa330
commit
9c04eb60bd
7 changed files with 67 additions and 71 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue