Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 6fa8e27

Browse files
author
George Wright
committed
use async_get_default_dispatcher instead of creating a Loop object
1 parent 110d157 commit 6fa8e27

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

shell/platform/fuchsia/flutter/main.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ int main(int argc, char const* argv[]) {
2222
{
2323
TRACE_DURATION("flutter", "CreateTraceProvider");
2424
bool already_started;
25-
async::Loop loop(&kAsyncLoopConfigAttachToCurrentThread);
2625
// Use CreateSynchronously to prevent loss of early events.
2726
trace::TraceProviderWithFdio::CreateSynchronously(
28-
loop.dispatcher(), "flutter_runner", &provider, &already_started);
27+
async_get_default_dispatcher(), "flutter_runner", &provider, &already_started);
2928
}
3029

3130
// Set up the process-wide /tmp memfs.

shell/platform/fuchsia/flutter/runner.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ bool Runner::SetupTZDataInternal() {
284284
void Runner::SetupTraceObserver() {
285285
trace_observer_ = std::make_unique<trace::TraceObserver>();
286286
ASSERT_TRUE(message_loop_.GetTaskRunner()->RunsTasksOnCurrentThread());
287-
async::Loop loop(&kAsyncLoopConfigAttachToCurrentThread);
288-
trace_observer_->Start(loop.dispatcher(), [runner = this]() {
287+
trace_observer_->Start(async_get_default_dispatcher()), [runner = this]() {
289288
if (!trace_is_category_enabled("dart:profiler")) {
290289
return;
291290
}

0 commit comments

Comments
 (0)