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
|
@ -1767,7 +1767,7 @@ impl ScriptThread {
|
|||
unsafe {
|
||||
let _ac = JSAutoCompartment::new(self.get_cx(), window.reflector().get_jsobject().get());
|
||||
rooted!(in(self.get_cx()) let mut jsval = UndefinedValue());
|
||||
GlobalRef::Window(&window).evaluate_js_on_global_with_result(
|
||||
window.upcast::<GlobalScope>().evaluate_js_on_global_with_result(
|
||||
&script_source, jsval.handle_mut());
|
||||
let strval = DOMString::from_jsval(self.get_cx(),
|
||||
jsval.handle(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue