From 1328dca451ffaa2d942b9797da90de7a40a837d4 Mon Sep 17 00:00:00 2001 From: Rohan Pavone Date: Sat, 28 Jan 2023 04:13:19 +0000 Subject: [PATCH] Revert "[fuchsia] Migrate web_engine_shell to launch web_instance.cm" This reverts commit 986da2599c8db5910f87cd27acb5c00810aba7c0. Reason for revert: Causing failures in WES on EME video performance tests. Original change's description: > [fuchsia] Migrate web_engine_shell to launch web_instance.cm > > In so doing: > > - A relauncher is introduced to launch a new component between > test_manager and web_engine_shell when WebInstanceHost is used, as > this is required for it to route capabilities to WebEngine. > - WebInstanceHost now supports the test-only --with-webui switch to run > a WebEngine with access to WebUI resources. > - WebInstanceHost now destroys any active children upon destruction > rather than requiring that the consumer wait for them to exit. > > Bug: 1280703 > Change-Id: I8481b854542524f7eef69d66059ff1767ba60f93 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4134846 > Reviewed-by: Wez > Auto-Submit: Greg Thompson > Commit-Queue: Greg Thompson > Cr-Commit-Position: refs/heads/main@{#1095363} Bug: 1280703, b/266732759 Change-Id: Iedea48b1424b558aa7a3d7f6d6edcfdfa41fa3d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4195534 Reviewed-by: Alex Gough Reviewed-by: Greg Thompson Auto-Submit: Rohan Pavone Commit-Queue: Alex Gough Reviewed-by: David Dorwin Cr-Commit-Position: refs/heads/main@{#1098257} --- fuchsia_web/shell/BUILD.gn | 18 +-- fuchsia_web/shell/web_engine_shell.cc | 103 +++--------------- fuchsia_web/shell/web_engine_shell.cml | 91 +--------------- ...web_engine_shell_for_web_instance_host.cml | 52 --------- fuchsia_web/webengine/BUILD.gn | 1 - fuchsia_web/webengine/web_instance.cml | 12 +- .../webinstance_host/web_instance_host.cc | 53 ++++----- .../webinstance_host/web_instance_host.h | 4 +- .../web_instance_host.shard.cml | 20 ++-- 9 files changed, 56 insertions(+), 298 deletions(-) delete mode 100644 fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml diff --git a/fuchsia_web/shell/BUILD.gn b/fuchsia_web/shell/BUILD.gn index 5fb4cd7fef56c..e2ba49f2c87bd 100644 --- a/fuchsia_web/shell/BUILD.gn +++ b/fuchsia_web/shell/BUILD.gn @@ -56,16 +56,6 @@ fuchsia_component("web_engine_shell_component") { data_deps = [ ":web_engine_shell_exec" ] } -# WebInstanceHost needs to serve capabilities to web_instance. Since the -# primary web_engine_shell component is a test component, it is not able to do -# this directly. Instead, it launches this here component to start instances via -# WebInstanceHost. -fuchsia_component("web_engine_shell_for_web_instance_host_component") { - testonly = true - manifest = "web_engine_shell_for_web_instance_host.cml" - data_deps = [ ":web_engine_shell_exec" ] -} - fuchsia_component("web_engine_shell_component_v1") { testonly = true manifest = "web_engine_shell.cmx" @@ -80,7 +70,6 @@ fuchsia_package("web_engine_shell_pkg") { deps = [ ":web_engine_shell_component", ":web_engine_shell_component_v1", - ":web_engine_shell_for_web_instance_host_component", ] } @@ -112,13 +101,8 @@ executable("web_engine_shell_exec") { "//base", "//components/fuchsia_component_support:annotations_manager", "//fuchsia_web/common", - "//fuchsia_web/webinstance_host:webinstance_host", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.component", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.component.decl", - "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.web", + "//fuchsia_web/webinstance_host:webinstance_host_v1", "//third_party/fuchsia-sdk/sdk/pkg/fdio", - "//third_party/fuchsia-sdk/sdk/pkg/fidl_cpp", - "//third_party/fuchsia-sdk/sdk/pkg/sys_component_cpp_testing", "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp", "//third_party/widevine/cdm:buildflags", "//url", diff --git a/fuchsia_web/shell/web_engine_shell.cc b/fuchsia_web/shell/web_engine_shell.cc index b94868c0f2acb..1356ee9116560 100644 --- a/fuchsia_web/shell/web_engine_shell.cc +++ b/fuchsia_web/shell/web_engine_shell.cc @@ -2,21 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include #include #include #include #include -#include -#include #include -#include - +#include #include #include #include "base/base_paths.h" -#include "base/check.h" #include "base/command_line.h" #include "base/files/file_util.h" #include "base/fuchsia/file_utils.h" @@ -26,7 +21,6 @@ #include "base/logging.h" #include "base/message_loop/message_pump_type.h" #include "base/path_service.h" -#include "base/ranges/algorithm.h" #include "base/run_loop.h" #include "base/strings/stringprintf.h" #include "base/task/single_thread_task_executor.h" @@ -36,7 +30,7 @@ #include "fuchsia_web/common/init_logging.h" #include "fuchsia_web/shell/present_frame.h" #include "fuchsia_web/shell/remote_debugging_port.h" -#include "fuchsia_web/webinstance_host/web_instance_host.h" +#include "fuchsia_web/webinstance_host/web_instance_host_v1.h" #include "third_party/widevine/cdm/buildflags.h" #include "url/gurl.h" @@ -48,7 +42,6 @@ constexpr char kHeadlessSwitch[] = "headless"; constexpr char kEnableProtectedMediaIdentifier[] = "enable-protected-media-identifier"; constexpr char kWebEnginePackageName[] = "web-engine-package-name"; -constexpr char kFromLauncher[] = "from-launcher"; constexpr char kUseWebInstance[] = "use-web-instance"; constexpr char kEnableWebInstanceTmp[] = "enable-web-instance-tmp"; @@ -118,87 +111,17 @@ fuchsia::web::ContextProviderPtr ConnectToContextProvider( return web_engine_service_dir.Connect(); } -// Appends the arguments of `command_line` (ignoring the program name at -// position zero) to the command line for the realm. -void AppendCommandLineArguments(component_testing::RealmBuilder& realm_builder, - const base::CommandLine& command_line) { - auto decl = realm_builder.GetRealmDecl(); - - // Find the "args" list in the program declaration. - fuchsia::data::DictionaryEntry* args_entry = nullptr; - auto* entries = decl.mutable_program()->mutable_info()->mutable_entries(); - for (auto& entry : *entries) { - if (entry.key == "args") { - DCHECK(entry.value->is_str_vec()); - args_entry = &entry; - break; - } - } - if (!args_entry) { - // Create a new "args" list and insert it at the proper location in the - // program's entries. - auto lower_bound = base::ranges::lower_bound( - *entries, "args", /*comp=*/{}, - [](const fuchsia::data::DictionaryEntry& entry) { return entry.key; }); - auto it = entries->emplace(lower_bound); - it->key = "args"; - it->value = fuchsia::data::DictionaryValue::New(); - it->value->set_str_vec({}); - args_entry = &*it; - } - - // Append all args following the program name in `command_line` to the - // program's args. - args_entry->value->str_vec().insert(args_entry->value->str_vec().end(), - command_line.argv().begin() + 1, - command_line.argv().end()); - realm_builder.ReplaceRealmDecl(std::move(decl)); -} - -// web_engine_shell needs to provide capabilities to children it launches (via -// WebInstanceHost, for example). Test components are not able to do this, so -// use RealmBuilder to relaunch web_engine_shell via -// `web_engine_shell_for_web_instance_host_component` (which includes -// `--from-launcher` on its command line) with the contents of this process's -// command line. -int RelaunchForWebInstanceHost(const base::CommandLine& command_line) { - auto realm_builder = component_testing::RealmBuilder::CreateFromRelativeUrl( - "#meta/web_engine_shell_for_web_instance_host.cm"); - AppendCommandLineArguments(realm_builder, command_line); - - auto realm = realm_builder.Build(); - - fuchsia::component::BinderPtr binder_proxy = - realm.component().Connect(); - - // Wait for binder_proxy to be closed. - base::RunLoop run_loop; - binder_proxy.set_error_handler( - [quit_closure = run_loop.QuitClosure()](zx_status_t status) { - std::move(quit_closure).Run(); - }); - run_loop.Run(); - - // Nothing depends on the process exit code of web_engine_shell today, so - // simply return success in all cases. - return 0; -} - } // namespace int main(int argc, char** argv) { - base::CommandLine::Init(argc, argv); + base::SingleThreadTaskExecutor executor(base::MessagePumpType::IO); + // Parse the command line arguments and set up logging. + CHECK(base::CommandLine::Init(argc, argv)); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - CHECK(InitLoggingFromCommandLine(*command_line)); - base::SingleThreadTaskExecutor executor(base::MessagePumpType::IO); - - const bool is_run_from_launcher = command_line->HasSwitch(kFromLauncher); - const bool use_context_provider = !command_line->HasSwitch(kUseWebInstance); - if (!is_run_from_launcher && !use_context_provider) { - return RelaunchForWebInstanceHost(*command_line); - } + CHECK(InitLoggingFromCommandLineDefaultingToStderrForTest( // IN-TEST + command_line)); absl::optional remote_debugging_port = GetRemoteDebuggingPort(*command_line); @@ -210,6 +133,7 @@ int main(int argc, char** argv) { const bool is_headless = command_line->HasSwitch(kHeadlessSwitch); const bool enable_protected_media_identifier_access = command_line->HasSwitch(kEnableProtectedMediaIdentifier); + const bool use_context_provider = !command_line->HasSwitch(kUseWebInstance); const bool enable_web_instance_tmp = command_line->HasSwitch(kEnableWebInstanceTmp); @@ -281,9 +205,12 @@ int main(int argc, char** argv) { base::RunLoop run_loop; - fuchsia::web::ContextProviderPtr web_context_provider; - std::unique_ptr web_instance_host; + // Create the browser |context|. fuchsia::web::ContextPtr context; + + // Keep alive in run_loop scope. + fuchsia::web::ContextProviderPtr web_context_provider; + std::unique_ptr web_instance_host; fuchsia::io::DirectoryHandle tmp_directory; if (use_context_provider) { @@ -293,7 +220,7 @@ int main(int argc, char** argv) { web_context_provider->Create(std::move(create_context_params), context.NewRequest()); } else { - web_instance_host = std::make_unique(); + web_instance_host = std::make_unique(); if (enable_web_instance_tmp) { const zx_status_t status = fdio_open( "/tmp", @@ -397,8 +324,6 @@ int main(int argc, char** argv) { LOG(INFO) << "Launched browser at URL " << url.spec(); - base::ComponentContextForProcess()->outgoing()->ServeFromStartupInfo(); - // Run until the process is killed with CTRL-C or the connections to Web // Engine interfaces are dropped. run_loop.Run(); diff --git a/fuchsia_web/shell/web_engine_shell.cml b/fuchsia_web/shell/web_engine_shell.cml index e89e965bf2e6d..057f6d18e77dc 100644 --- a/fuchsia_web/shell/web_engine_shell.cml +++ b/fuchsia_web/shell/web_engine_shell.cml @@ -10,7 +10,6 @@ // to function correctly. "//build/config/fuchsia/test/chromium_test_facet.shard.test-cml", "//build/config/fuchsia/test/elf_test_ambient_exec_runner.shard.test-cml", - "sys/component/realm_builder_absolute.shard.cml", "syslog/client.shard.cml", ], program: { @@ -19,6 +18,7 @@ use: [ { protocol: [ + "fuchsia.element.GraphicalPresenter", "fuchsia.feedback.ComponentDataRegister", "fuchsia.feedback.CrashReportingProductRegister", "fuchsia.sys.Environment", @@ -33,14 +33,10 @@ protocol: "fuchsia.web.ContextProvider", availability: "optional", }, - - // Used to hold the cdm_data directory passed to web_instance. { storage: "data", path: "/data", }, - - // Needed when launched with --enable-web-instance-tmp. { storage: "tmp", path: "/tmp", @@ -84,84 +80,6 @@ { protocol: [ "fuchsia.accessibility.semantics.SemanticsManager", - "fuchsia.element.GraphicalPresenter", - "fuchsia.tracing.provider.Registry", - "fuchsia.ui.composition.Allocator", - "fuchsia.ui.composition.Flatland", - "fuchsia.ui.policy.Presenter", - "fuchsia.ui.scenic.Scenic", - "fuchsia.vulkan.loader.Loader", - ], - availability: "optional", - }, - { - protocol: "fuchsia.tracing.perfetto.ProducerConnector", - availability: "optional", - }, - ], - offer: [ - { - storage: [ - "data", - "tmp", - ], - from: "parent", - to: "#realm_builder", - }, - { - directory: [ - "config-data", - "root-ssl-certificates", - ], - from: "parent", - to: "#realm_builder", - }, - - // Offers for web_instance.cm. - { - protocol: [ - "fuchsia.buildinfo.Provider", - "fuchsia.device.NameProvider", - "fuchsia.feedback.ComponentDataRegister", - "fuchsia.feedback.CrashReportingProductRegister", - "fuchsia.fonts.Provider", - "fuchsia.hwinfo.Product", - "fuchsia.input.virtualkeyboard.ControllerCreator", - "fuchsia.intl.PropertyProvider", - "fuchsia.kernel.VmexResource", - "fuchsia.media.Audio", - "fuchsia.media.AudioDeviceEnumerator", - "fuchsia.media.ProfileProvider", - "fuchsia.media.SessionAudioConsumerFactory", - "fuchsia.mediacodec.CodecFactory", - "fuchsia.memorypressure.Provider", - "fuchsia.net.interfaces.State", - "fuchsia.net.name.Lookup", - "fuchsia.posix.socket.Provider", - "fuchsia.process.Launcher", - "fuchsia.sysmem.Allocator", - "fuchsia.ui.input3.Keyboard", - ], - from: "parent", - to: "#realm_builder", - }, - - // Used conditionally based on the value of `enable_widevine` at build time. - // TODO(crbug.com/1379411): Use a shard to conditionally use based on - // build-time config. - { - protocol: "fuchsia.media.drm.Widevine", - from: "parent", - to: "#realm_builder", - availability: "optional", - }, - - // Used conditionally based on the absence of `--headless` on the command - // line at runtime. - { - protocol: [ - "fuchsia.accessibility.semantics.SemanticsManager", - "fuchsia.element.GraphicalPresenter", "fuchsia.tracing.provider.Registry", "fuchsia.ui.composition.Allocator", "fuchsia.ui.composition.Flatland", @@ -169,22 +87,15 @@ "fuchsia.ui.scenic.Scenic", "fuchsia.vulkan.loader.Loader", ], - from: "parent", - to: "#realm_builder", availability: "optional", }, - - // Optional capabilities, dependent on availability of tracing services. { protocol: "fuchsia.tracing.perfetto.ProducerConnector", - from: "parent", - to: "#realm_builder", availability: "optional", }, ], facets: { "fuchsia.test.deprecated-allowed-packages": [ - "test_manager", "web_engine", "web_engine_with_webui", ], diff --git a/fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml b/fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml deleted file mode 100644 index 5f377f257ead7..0000000000000 --- a/fuchsia_web/shell/web_engine_shell_for_web_instance_host.cml +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2023 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -{ - include: [ - "//fuchsia_web/webinstance_host/web_instance_host.shard.cml", - "syslog/client.shard.cml", - "vulkan/client.shard.cml", - ], - program: { - runner: "elf", - binary: "web_engine_shell_exec", - args: [ - // Inform web_engine_shell that it is running as the sub-process in which - // WebInstanceHost may be used. In this scenario, the main test component - // is running only as a launcher of this child. - "--from-launcher", - ], - - // Required to allow JIT in child processes such as renderers. - // Known as 'deprecated-ambient-replace-as-executable' in CFv1. - job_policy_ambient_mark_vmo_exec: "true", - }, - use: [ - // Required if not run with --headless. - { - protocol: [ - "fuchsia.element.GraphicalPresenter", - "fuchsia.ui.policy.Presenter", - ], - availability: "optional", - }, - - // Used to hold the cdm_data directory passed to web_instance. - { - storage: "data", - path: "/data", - }, - - // Needed when launched with --enable-web-instance-tmp. - { - storage: "tmp", - path: "/tmp", - }, - ], - facets: { - "fuchsia.test.deprecated-allowed-packages": [ - "web_engine", - "web_engine_with_webui", - ], - }, -} diff --git a/fuchsia_web/webengine/BUILD.gn b/fuchsia_web/webengine/BUILD.gn index 4d0db0bcc7455..cb104d881dc72 100644 --- a/fuchsia_web/webengine/BUILD.gn +++ b/fuchsia_web/webengine/BUILD.gn @@ -516,7 +516,6 @@ fuchsia_package("web_engine_with_webui") { # TODO(fxbug.dev/100944): Add appropriate visibility when fixed. deps = [ ":context_provider_v1_with_webui_component", - ":web_instance_component", ":web_instance_component_cfv1", ":webui_resources", ] diff --git a/fuchsia_web/webengine/web_instance.cml b/fuchsia_web/webengine/web_instance.cml index 8085c7286ea6c..4d884f4e4ff79 100644 --- a/fuchsia_web/webengine/web_instance.cml +++ b/fuchsia_web/webengine/web_instance.cml @@ -75,13 +75,6 @@ path: "/config/command-line", availability: "optional", }, - // Temporary directory specified by WebInstanceHost.set_tmp_dir. - { - directory: "tmp", - path: "/tmp", - rights: [ "rw*" ], - availability: "optional", - }, { // Required capabilities for all configurations. protocol: [ @@ -160,5 +153,10 @@ ], availability: "optional", }, + { + storage: "cache", + path: "/cache", + availability: "optional", + }, ] } diff --git a/fuchsia_web/webinstance_host/web_instance_host.cc b/fuchsia_web/webinstance_host/web_instance_host.cc index 0e8f39a49f460..75b75c761705f 100644 --- a/fuchsia_web/webinstance_host/web_instance_host.cc +++ b/fuchsia_web/webinstance_host/web_instance_host.cc @@ -43,10 +43,6 @@ namespace fcdecl = ::fuchsia::component::decl; constexpr char kWebInstanceComponentUrl[] = "fuchsia-pkg://fuchsia.com/web_engine#meta/web_instance.cm"; -// Test-only URL for web hosting Component instances with WebUI resources. -const char kWebInstanceWithWebUiComponentUrl[] = - "fuchsia-pkg://fuchsia.com/web_engine_with_webui#meta/web_instance.cm"; - // The name of the component collection hosting the instances. constexpr char kCollectionName[] = "web_instances"; @@ -62,8 +58,7 @@ std::string InstanceNameFromId(const base::GUID& id) { return base::StrCat({kCollectionName, "_", id.AsLowercaseString()}); } -void DestroyInstance(fuchsia::component::Realm& realm, - const std::string& name) { +void DestroyChild(fuchsia::component::Realm& realm, const std::string& name) { realm.DestroyChild( fcdecl::ChildRef{.name = name, .collection = kCollectionName}, [](::fuchsia::component::Realm_DestroyChild_Result destroy_result) { @@ -72,8 +67,8 @@ void DestroyInstance(fuchsia::component::Realm& realm, }); } -void DestroyInstanceDirectory(vfs::PseudoDir* instances_dir, - const std::string& name) { +void DestroyChildDirectory(vfs::PseudoDir* instances_dir, + const std::string& name) { zx_status_t status = instances_dir->RemoveEntry(name); ZX_DCHECK(status == ZX_OK, status); } @@ -196,7 +191,7 @@ InstanceBuilder::InstanceBuilder(fuchsia::component::Realm& realm, InstanceBuilder::~InstanceBuilder() { if (instance_dir_) { - DestroyInstanceDirectory(GetWebInstancesCollectionDir(), name_); + DestroyChildDirectory(GetWebInstancesCollectionDir(), name_); } } @@ -268,14 +263,7 @@ Instance InstanceBuilder::Build( fcdecl::Child child_decl; child_decl.set_name(name_); - // TODO(crbug.com/1010222): Make kWebInstanceComponentUrl a relative - // component URL and remove this workaround. - // TODO(crbug.com/1395054): Better yet, replace the with_webui component with - // direct routing of the resources from web_engine_shell. - child_decl.set_url( - base::CommandLine::ForCurrentProcess()->HasSwitch("with-webui") - ? kWebInstanceWithWebUiComponentUrl - : kWebInstanceComponentUrl); + child_decl.set_url(kWebInstanceComponentUrl); child_decl.set_startup(fcdecl::StartupMode::LAZY); ::fuchsia::component::CreateChildArgs create_child_args; @@ -424,7 +412,7 @@ WebInstanceHost::WebInstanceHost() { WebInstanceHost::~WebInstanceHost() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - Uninitialize(); + DCHECK(instances_.empty()); } zx_status_t WebInstanceHost::CreateInstanceForContextWithCopiedArgs( @@ -506,29 +494,28 @@ void WebInstanceHost::Initialize() { void WebInstanceHost::Uninitialize() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - - // Destroy all child instances and each one's outgoing directory subtree. - auto* const instances_dir = GetWebInstancesCollectionDir(); - for (auto& [id, binder_ptr] : instances_) { - const std::string name(InstanceNameFromId(id)); - if (realm_) { - DestroyInstance(*realm_, name); - } - DestroyInstanceDirectory(instances_dir, name); - binder_ptr.Unbind(); - } - instances_.clear(); + DCHECK(instances_.empty()); realm_.Unbind(); // Note: the entry in the outgoing directory for the top-level instances dir - // is leaked in support of having multiple hosts active in a single process. + // is leaked in case multiple hosts are active in the same process. } void WebInstanceHost::OnRealmError(zx_status_t status) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); ZX_LOG(ERROR, status) << "RealmBuilder channel error"; + + // Disconnect from all children and remove their directories. + auto* const instances_dir = GetWebInstancesCollectionDir(); + for (auto& [id, binder_ptr] : instances_) { + DestroyChildDirectory(instances_dir, InstanceNameFromId(id)); + binder_ptr.Unbind(); + } + instances_.clear(); + + // Go back to the initial state. Uninitialize(); } @@ -538,10 +525,10 @@ void WebInstanceHost::OnComponentBinderClosed(const base::GUID& id, // Destroy the child instance. const std::string name(InstanceNameFromId(id)); - DestroyInstance(*realm_, name); + DestroyChild(*realm_, name); // Drop the directory subtree for the child instance. - DestroyInstanceDirectory(GetWebInstancesCollectionDir(), name); + DestroyChildDirectory(GetWebInstancesCollectionDir(), name); // Drop the hold on the instance's Binder. Note: destroying the InterfacePtr // here also deletes the lambda into which `id` was bound, so `id` must not diff --git a/fuchsia_web/webinstance_host/web_instance_host.h b/fuchsia_web/webinstance_host/web_instance_host.h index 7a07a32d511d7..442aa958269bc 100644 --- a/fuchsia_web/webinstance_host/web_instance_host.h +++ b/fuchsia_web/webinstance_host/web_instance_host.h @@ -82,8 +82,8 @@ class WebInstanceHost { // Connects to the fuchsia.component/Realm protocol. void Initialize(); - // Destroys all child instances and associated resources and unbinds from the - // fuchsia.component/Realm protocol. + // Unbinds from the fuchsia.component/Realm protocol. May only be called once + // all web_instances have terminated. void Uninitialize(); // Error handler for the channel to RealmBuilder. diff --git a/fuchsia_web/webinstance_host/web_instance_host.shard.cml b/fuchsia_web/webinstance_host/web_instance_host.shard.cml index 823592280e9c0..888bd5a9c45c5 100644 --- a/fuchsia_web/webinstance_host/web_instance_host.shard.cml +++ b/fuchsia_web/webinstance_host/web_instance_host.shard.cml @@ -35,10 +35,12 @@ ], offer: [ { - directory: [ - "config-data", - "root-ssl-certificates", - ], + directory: "config-data", + from: "parent", + to: "#web_instances", + }, + { + directory: "root-ssl-certificates", from: "parent", to: "#web_instances", }, @@ -54,6 +56,7 @@ "fuchsia.memorypressure.Provider", "fuchsia.process.Launcher", "fuchsia.sysmem.Allocator", + "fuchsia.tracing.provider.Registry", ], from: "parent", to: "#web_instances", @@ -71,13 +74,16 @@ // Optionally used by the tracing service. "fuchsia.tracing.perfetto.ProducerConnector", - - // Required by Vulkan when not run with --headless. - "fuchsia.tracing.provider.Registry", ], from: "parent", to: "#web_instances", availability: "optional", + source_availability: "unknown", + }, + { + storage: "cache", + from: "parent", + to: "#web_instances", }, ], }