aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/workletglobalscope.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/workletglobalscope.rs')
-rw-r--r--components/script/dom/workletglobalscope.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/workletglobalscope.rs b/components/script/dom/workletglobalscope.rs
index 29d5b9b7f99..96270b8fab8 100644
--- a/components/script/dom/workletglobalscope.rs
+++ b/components/script/dom/workletglobalscope.rs
@@ -85,14 +85,14 @@ impl WorkletGlobalScope {
}
/// Get the JS context.
- pub fn get_cx(&self) -> JSContext {
- self.globalscope.get_cx()
+ pub fn get_cx() -> JSContext {
+ GlobalScope::get_cx()
}
/// Evaluate a JS script in this global.
pub fn evaluate_js(&self, script: &str) -> bool {
debug!("Evaluating Dom in a worklet.");
- rooted!(in (*self.globalscope.get_cx()) let mut rval = UndefinedValue());
+ rooted!(in (*GlobalScope::get_cx()) let mut rval = UndefinedValue());
self.globalscope.evaluate_js_on_global_with_result(
&*script,
rval.handle_mut(),