aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/timers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/timers.rs')
-rw-r--r--components/script/timers.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/script/timers.rs b/components/script/timers.rs
index 5e236f07494..ebc0bd8874c 100644
--- a/components/script/timers.rs
+++ b/components/script/timers.rs
@@ -12,6 +12,7 @@ use crate::dom::eventsource::EventSourceTimeoutCallback;
use crate::dom::globalscope::GlobalScope;
use crate::dom::testbinding::TestBindingCallback;
use crate::dom::xmlhttprequest::XHRTimeoutCallback;
+use crate::script_module::ScriptFetchOptions;
use crate::script_thread::ScriptThread;
use euclid::Length;
use ipc_channel::ipc::IpcSender;
@@ -541,7 +542,13 @@ impl JsTimerTask {
let global = this.global();
let cx = global.get_cx();
rooted!(in(*cx) let mut rval = UndefinedValue());
- global.evaluate_js_on_global_with_result(code_str, rval.handle_mut());
+ // FIXME(cybai): Use base url properly by saving private reference for timers (#27260)
+ global.evaluate_js_on_global_with_result(
+ code_str,
+ rval.handle_mut(),
+ ScriptFetchOptions::default_classic_script(&global),
+ global.api_base_url(),
+ );
},
InternalTimerCallback::FunctionTimerCallback(ref function, ref arguments) => {
let arguments = self.collect_heap_args(arguments);