Make GlobalScope.get_cx a static method.

This commit is contained in:
Josh Matthews 2023-02-16 23:09:50 -05:00
parent 4998c65c42
commit f79e1e327d
39 changed files with 132 additions and 127 deletions

View file

@ -3697,7 +3697,7 @@ impl ScriptThread {
// Script source is ready to be evaluated (11.)
let _ac = enter_realm(global_scope);
rooted!(in(*global_scope.get_cx()) let mut jsval = UndefinedValue());
rooted!(in(*GlobalScope::get_cx()) let mut jsval = UndefinedValue());
global_scope.evaluate_js_on_global_with_result(
&script_source,
jsval.handle_mut(),
@ -3708,7 +3708,7 @@ impl ScriptThread {
load_data.js_eval_result = if jsval.get().is_string() {
unsafe {
let strval = DOMString::from_jsval(
*global_scope.get_cx(),
*GlobalScope::get_cx(),
jsval.handle(),
StringificationBehavior::Empty,
);