Mozart: Publish scene when scene token becomes available.
Fixes a bug in the Mozart view manager where the stub scene
(the wrapper) was only updated when the view token became
available or when view properties changed. We forgot to also
do it when the stub scene token becomes available.
We didn't notice this problem before because normally we hit the
case where the view token gets resolved after the scene token
but if the view already exists then we may end up in the case
where the long pole is waiting for the scene to be registered.
BUG=
R=anwilson@google.com
Review URL: https://codereview.chromium.org/1884833002 .
diff --git a/services/ui/view_manager/view_registry.cc b/services/ui/view_manager/view_registry.cc
index b52cb71..aee3a46 100644
--- a/services/ui/view_manager/view_registry.cc
+++ b/services/ui/view_manager/view_registry.cc
@@ -245,6 +245,8 @@
// Store the scene token.
DCHECK(view_stub->is_linked());
view_stub->SetStubSceneToken(scene_token.Clone());
+ if (view_stub->state())
+ PublishStubScene(view_stub->state());
// Send view info to the container including the scene token.
auto view_info = mojo::ui::ViewInfo::New();