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

Commit cfe164f

Browse files
[fuchsia][scenic] Fix invalid viewRef error in pointer injection. (#36850)
This CL fixes the bug in pointer injector delegate where the viewRef is incorrectly cloned in the flatland platform view, causing an invalid viewRef to be passed in the Fidl request. Test: flutter-embedder-test
1 parent dd91599 commit cfe164f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

shell/platform/fuchsia/flutter/flatland_platform_view.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ void FlatlandPlatformView::OnChildViewViewRef(
154154
fuchsia::ui::views::ViewRef view_ref) {
155155
FML_CHECK(child_view_info_.count(content_id) == 1);
156156

157-
focus_delegate_->OnChildViewViewRef(view_id, std::move(view_ref));
158-
159157
fuchsia::ui::views::ViewRef view_ref_clone;
160158
fidl::Clone(view_ref, &view_ref_clone);
159+
160+
focus_delegate_->OnChildViewViewRef(view_id, std::move(view_ref));
161+
161162
pointer_injector_delegate_->OnCreateView(view_id, std::move(view_ref_clone));
162163
OnChildViewConnected(content_id);
163164
}

0 commit comments

Comments
 (0)