summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/CrashReporter/main.cpp10
-rw-r--r--Userland/Applications/SystemMonitor/ThreadStackWidget.cpp2
2 files changed, 5 insertions, 7 deletions
diff --git a/Userland/Applications/CrashReporter/main.cpp b/Userland/Applications/CrashReporter/main.cpp
index e7993e7874..9a956b3970 100644
--- a/Userland/Applications/CrashReporter/main.cpp
+++ b/Userland/Applications/CrashReporter/main.cpp
@@ -298,12 +298,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
size_t thread_index = 0;
coredump->for_each_thread_info([&](auto& thread_info) {
results.thread_backtraces.append(build_backtrace(*coredump, thread_info, thread_index, [&](size_t frame_index, size_t frame_count) {
- Core::EventLoop::with_main_locked([&](auto& main) {
- main->deferred_invoke([&, frame_index, frame_count] {
- window->set_progress(100.0f * (float)(frame_index + 1) / (float)frame_count);
- progressbar.set_value(frame_index + 1);
- progressbar.set_max(frame_count);
- });
+ app->event_loop().deferred_invoke([&, frame_index, frame_count] {
+ window->set_progress(100.0f * (float)(frame_index + 1) / (float)frame_count);
+ progressbar.set_value(frame_index + 1);
+ progressbar.set_max(frame_count);
});
}));
results.thread_cpu_registers.append(build_cpu_registers(thread_info, thread_index));
diff --git a/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp b/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
index 998cb50868..3c025499aa 100644
--- a/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
+++ b/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
@@ -123,7 +123,7 @@ void ThreadStackWidget::refresh()
[weak_this = make_weak_ptr()](auto result) {
if (!weak_this)
return;
- Core::EventLoop::with_main_locked([&](auto* main_event_loop) { main_event_loop->post_event(const_cast<Core::Object&>(*weak_this), make<CompletionEvent>(move(result))); });
+ Core::EventLoop::current().post_event(const_cast<Core::Object&>(*weak_this), make<CompletionEvent>(move(result)));
});
}