diff --git a/shell/platform/android/android_shell_holder.cc b/shell/platform/android/android_shell_holder.cc index e9b114fc42252..a86f014de7c7b 100644 --- a/shell/platform/android/android_shell_holder.cc +++ b/shell/platform/android/android_shell_holder.cc @@ -179,9 +179,9 @@ void AndroidShellHolder::SetViewportMetrics( } shell_->GetTaskRunners().GetUITaskRunner()->PostTask( - [engine = shell_->GetEngine(), metrics]() { - if (engine) { - engine->SetViewportMetrics(metrics); + [platform_view = platform_view_, metrics]() { + if (platform_view) { + platform_view->SetViewportMetrics(metrics); } }); }