From afd577c7338287c0d8bfdff9ecd8442579551e41 Mon Sep 17 00:00:00 2001 From: Chase Latta <638538+chaselatta@users.noreply.github.com> Date: Mon, 4 Oct 2021 13:18:03 -0700 Subject: [PATCH] [fuchsia] publish dart runner v2 protocol (flutter/engine#28993) --- .../shell/platform/fuchsia/dart_runner/dart_runner.cc | 7 +++++++ .../shell/platform/fuchsia/dart_runner/dart_runner.h | 2 ++ .../platform/fuchsia/dart_runner/meta/common.shard.cml | 1 - 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc index 4226754b77a..fba5805216c 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.cc @@ -165,6 +165,13 @@ DartRunner::DartRunner(sys::ComponentContext* context) : context_(context) { bindings_.AddBinding(this, std::move(request)); }); + context_->outgoing() + ->AddPublicService( + [this](fidl::InterfaceRequest< + fuchsia::component::runner::ComponentRunner> request) { + component_runner_bindings_.AddBinding(this, std::move(request)); + }); + #if !defined(DART_PRODUCT) // The VM service isolate uses the process-wide namespace. It writes the // vm service protocol port under /tmp. The VMServiceObject exposes that diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.h b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.h index cee7a7b34fa..ce47eecd817 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.h +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/dart_runner.h @@ -36,6 +36,8 @@ class DartRunner : public fuchsia::sys::Runner, // Not owned by DartRunner. sys::ComponentContext* context_; fidl::BindingSet bindings_; + fidl::BindingSet + component_runner_bindings_; #if !defined(AOT_RUNTIME) dart_utils::MappedResource vm_snapshot_data_; diff --git a/engine/src/flutter/shell/platform/fuchsia/dart_runner/meta/common.shard.cml b/engine/src/flutter/shell/platform/fuchsia/dart_runner/meta/common.shard.cml index 6c484449b0d..ac66658edf0 100644 --- a/engine/src/flutter/shell/platform/fuchsia/dart_runner/meta/common.shard.cml +++ b/engine/src/flutter/shell/platform/fuchsia/dart_runner/meta/common.shard.cml @@ -17,7 +17,6 @@ }, { protocol: [ - "fuchsia.component.runner.ComponentRunner", "fuchsia.device.NameProvider", // For fdio uname() "fuchsia.feedback.CrashReporter", "fuchsia.intl.PropertyProvider", // For dartVM timezone support