mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Reformat some task-related functions
This commit is contained in:
parent
35a7252254
commit
53d30d85b3
3 changed files with 28 additions and 20 deletions
|
@ -1281,19 +1281,21 @@ impl ScriptThread {
|
|||
|
||||
fn handle_msg_from_script(&self, msg: MainThreadScriptMsg) {
|
||||
match msg {
|
||||
MainThreadScriptMsg::Navigate(parent_pipeline_id, load_data, replace) =>
|
||||
self.handle_navigate(parent_pipeline_id, None, load_data, replace),
|
||||
MainThreadScriptMsg::ExitWindow(id) =>
|
||||
self.handle_exit_window_msg(id),
|
||||
MainThreadScriptMsg::Navigate(parent_pipeline_id, load_data, replace) => {
|
||||
self.handle_navigate(parent_pipeline_id, None, load_data, replace)
|
||||
},
|
||||
MainThreadScriptMsg::ExitWindow(id) => {
|
||||
self.handle_exit_window_msg(id)
|
||||
},
|
||||
MainThreadScriptMsg::Common(CommonScriptMsg::RunnableMsg(_, runnable)) => {
|
||||
// The category of the runnable is ignored by the pattern, however
|
||||
// it is still respected by profiling (see categorize_msg).
|
||||
runnable.main_thread_handler(self)
|
||||
}
|
||||
MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(reports_chan)) =>
|
||||
self.collect_reports(reports_chan),
|
||||
MainThreadScriptMsg::WorkletLoaded(pipeline_id) =>
|
||||
self.handle_worklet_loaded(pipeline_id),
|
||||
MainThreadScriptMsg::Common(CommonScriptMsg::CollectReports(chan)) => {
|
||||
self.collect_reports(chan)
|
||||
},
|
||||
MainThreadScriptMsg::WorkletLoaded(pipeline_id) => {
|
||||
self.handle_worklet_loaded(pipeline_id)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue