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

Commit ed93456

Browse files
author
auto-submit[bot]
committed
Revert "[engine] always force platform channel responses to schedule a task. (#54975)"
This reverts commit 015f3b1.
1 parent b5ff6b0 commit ed93456

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

shell/common/shell.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,10 +1076,10 @@ void Shell::OnPlatformViewDispatchPlatformMessage(
10761076

10771077
// The static leak checker gets confused by the use of fml::MakeCopyable.
10781078
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
1079-
// This logic must always explicitly post a task so that we are guaranteed
1080-
// to wake up the UI message loop to flush tasks.
1081-
task_runners_.GetUITaskRunner()->PostTask(fml::MakeCopyable(
1082-
[engine = engine_->GetWeakPtr(), message = std::move(message)]() mutable {
1079+
fml::TaskRunner::RunNowOrPostTask(
1080+
task_runners_.GetUITaskRunner(),
1081+
fml::MakeCopyable([engine = engine_->GetWeakPtr(),
1082+
message = std::move(message)]() mutable {
10831083
if (engine) {
10841084
engine->DispatchPlatformMessage(std::move(message));
10851085
}

0 commit comments

Comments
 (0)