aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index cd2008bf56b..c4177500b64 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -521,7 +521,7 @@ pub struct ScriptThread {
networking_task_sender: Box<dyn ScriptChan>,
- history_traversal_task_source: HistoryTraversalTaskSource,
+ history_traversal_task_sender: Sender<MainThreadScriptMsg>,
file_reading_task_sender: Box<dyn ScriptChan>,
@@ -1042,7 +1042,7 @@ impl ScriptThread {
performance_timeline_task_sender: boxed_script_sender.clone(),
remote_event_task_sender: boxed_script_sender.clone(),
- history_traversal_task_source: HistoryTraversalTaskSource(chan),
+ history_traversal_task_sender: chan.clone(),
control_chan: state.control_chan,
control_port: control_port,
@@ -1409,6 +1409,7 @@ impl ScriptThread {
ScriptThreadEventCategory::FormPlannedNavigation => {
ProfilerCategory::ScriptPlannedNavigation
},
+ ScriptThreadEventCategory::HistoryEvent => ProfilerCategory::ScriptHistoryEvent,
ScriptThreadEventCategory::ImageCacheMsg => ProfilerCategory::ScriptImageCacheMsg,
ScriptThreadEventCategory::InputEvent => ProfilerCategory::ScriptInputEvent,
ScriptThreadEventCategory::NetworkEvent => ProfilerCategory::ScriptNetworkEvent,
@@ -2180,6 +2181,13 @@ impl ScriptThread {
PerformanceTimelineTaskSource(self.performance_timeline_task_sender.clone(), pipeline_id)
}
+ pub fn history_traversal_task_source(
+ &self,
+ pipeline_id: PipelineId,
+ ) -> HistoryTraversalTaskSource {
+ HistoryTraversalTaskSource(self.history_traversal_task_sender.clone(), pipeline_id)
+ }
+
pub fn user_interaction_task_source(
&self,
pipeline_id: PipelineId,
@@ -2560,7 +2568,6 @@ impl ScriptThread {
);
let MainThreadScriptChan(ref sender) = self.chan;
- let HistoryTraversalTaskSource(ref history_sender) = self.history_traversal_task_source;
let (ipc_timer_event_chan, ipc_timer_event_port) = ipc::channel().unwrap();
route_ipc_receiver_to_new_servo_sender(ipc_timer_event_port, self.timer_event_chan.clone());
@@ -2584,7 +2591,7 @@ impl ScriptThread {
self.media_element_task_source(incomplete.pipeline_id),
self.user_interaction_task_source(incomplete.pipeline_id),
self.networking_task_source(incomplete.pipeline_id),
- HistoryTraversalTaskSource(history_sender.clone()),
+ self.history_traversal_task_source(incomplete.pipeline_id),
self.file_reading_task_source(incomplete.pipeline_id),
self.performance_timeline_task_source(incomplete.pipeline_id)
.clone(),