mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -41,7 +41,7 @@ pub fn handle_evaluate_js(global: &GlobalRef, eval: String, reply: IpcSender<Eva
|
|||
let globalhandle = global.reflector().get_jsobject();
|
||||
let _ac = JSAutoCompartment::new(cx, globalhandle.get());
|
||||
rooted!(in(cx) let mut rval = UndefinedValue());
|
||||
global.evaluate_js_on_global_with_result(&eval, rval.handle_mut());
|
||||
global.as_global_scope().evaluate_js_on_global_with_result(&eval, rval.handle_mut());
|
||||
|
||||
if rval.is_undefined() {
|
||||
EvaluateJSReply::VoidValue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue