Rich Kadel e43616416f [fuchsia] Replace deprecated AddLocalChild (flutter/engine#38788)
`AddLocalChild(LocalComponent*)` is deprecated.

It was replaced by:

`AddLocalChild(LocalComponentFactory)`, which is a type alias for a
lambda that returns a `std::unique_ptr<LocalComponentImpl>`.

This change addresses problems that arised due to object lifetime
management of the components, and allows RealmBuilder to model the
component lifecycle of local components in a way that's more consistent
with other components.

The RealmBuilder-built `Realm` now owns the lifetime of the local
components, instead of the client, and those objects are valid until
the `Realm` is destroyed.

Bug: fxbug.dev/109804
2023-01-11 16:54:22 -05:00
..