Skip to content

Commit

Permalink
[fuchsia] Bump the target API level to 10
Browse files Browse the repository at this point in the history
Note: we're working on moving the target API level definition out of .gn, this will hopefully be done during Q4.

Bug: 1376558
Change-Id: I3f5d6b45cfcb83e02d7f7c9d02bcdd9e3ce75958
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3965828
Reviewed-by: Wez <wez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@google.com>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1065518}
  • Loading branch information
sebmarchand authored and Chromium LUCI CQ committed Oct 31, 2022
1 parent fe61d39 commit bf52d9d
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .gn
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ default_args = {
# Overwrite default args declared in the Fuchsia sdk
fuchsia_sdk_readelf_exec =
"//third_party/llvm-build/Release+Asserts/bin/llvm-readelf"
fuchsia_target_api_level = 9
fuchsia_target_api_level = 10

devtools_visibility = [ "*" ]
}
Expand Down
3 changes: 1 addition & 2 deletions base/fuchsia/service_directory_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ ServiceDirectoryTestBase::ServiceDirectoryTestBase()
// Mount service dir and publish the service.
outgoing_directory_ = std::make_unique<sys::OutgoingDirectory>();
fidl::InterfaceHandle<::fuchsia::io::Directory> directory;
zx_status_t status =
outgoing_directory_->Serve(directory.NewRequest().TakeChannel());
zx_status_t status = outgoing_directory_->Serve(directory.NewRequest());
ZX_CHECK(status == ZX_OK, status);
service_binding_ =
std::make_unique<ScopedServiceBinding<testfidl::TestInterface>>(
Expand Down
2 changes: 1 addition & 1 deletion base/fuchsia/startup_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class BASE_EXPORT StartupContext {
std::unique_ptr<sys::ComponentContext> component_context_;

// Used to store outgoing directory until ServeOutgoingDirectory() is called.
zx::channel outgoing_directory_request_;
fidl::InterfaceRequest<fuchsia::io::Directory> outgoing_directory_request_;
};

} // namespace base
Expand Down
3 changes: 1 addition & 2 deletions base/fuchsia/test_component_context_for_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ TestComponentContextForProcess::TestComponentContextForProcess(
fidl::InterfaceHandle<::fuchsia::io::Directory> published_root_directory;
old_context_ = ReplaceComponentContextForProcessForTest(
std::make_unique<sys::ComponentContext>(
std::move(incoming_services),
published_root_directory.NewRequest().TakeChannel()));
std::move(incoming_services), published_root_directory.NewRequest()));

// Connect to the "/svc" directory of the |published_root_directory| and wrap
// that into a ServiceDirectory.
Expand Down
3 changes: 1 addition & 2 deletions components/fuchsia_component_support/inspect_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ class InspectTest : public ::testing::Test {
auto incoming_services =
std::make_shared<sys::ServiceDirectory>(std::move(incoming_directory));
context_ = std::make_unique<sys::ComponentContext>(
std::move(incoming_services),
published_root_directory_.NewRequest().TakeChannel());
std::move(incoming_services), published_root_directory_.NewRequest());
inspector_ = std::make_unique<sys::ComponentInspector>(context_.get());
base::RunLoop().RunUntilIdle();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,12 @@ class CastRunnerCfv1ShimIntegrationTest : public ::testing::Test {
svc_dir->Serve(fuchsia::io::OpenFlags::RIGHT_READABLE |
fuchsia::io::OpenFlags::RIGHT_WRITABLE,
svc_dir_handle.NewRequest().TakeChannel());
additional_services->host_directory = svc_dir_handle.TakeChannel();
additional_services->host_directory = std::move(svc_dir_handle);

launch_info.additional_services = std::move(additional_services);

fuchsia::io::DirectoryHandle cast_runner_services_dir;
launch_info.directory_request =
cast_runner_services_dir.NewRequest().TakeChannel();
launch_info.directory_request = cast_runner_services_dir.NewRequest();

fuchsia::sys::LauncherPtr launcher;
base::ComponentContextForProcess()->svc()->Connect(launcher.NewRequest());
Expand Down
2 changes: 1 addition & 1 deletion fuchsia_web/runners/cast/cast_runner_integration_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ class TestCastComponent {

fidl::InterfaceHandle<fuchsia::io::Directory> outgoing_directory;
startup_info.launch_info.directory_request =
outgoing_directory.NewRequest().TakeChannel();
outgoing_directory.NewRequest();

fidl::InterfaceHandle<fuchsia::io::Directory> svc_directory;
EXPECT_EQ(fdio_service_connect_at(
Expand Down
3 changes: 1 addition & 2 deletions fuchsia_web/runners/common/modular/agent_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ AgentImpl::AgentImpl(
agent_binding_(outgoing_directory, this) {
if (!public_service_names_.empty()) {
fuchsia::io::DirectoryHandle root_directory;
zx_status_t status =
outgoing_directory->Serve(root_directory.NewRequest().TakeChannel());
zx_status_t status = outgoing_directory->Serve(root_directory.NewRequest());
ZX_CHECK(status == ZX_OK, status) << "Serve(root)";
fuchsia::io::DirectoryHandle svc_directory;
status = fdio_service_connect_at(
Expand Down
4 changes: 2 additions & 2 deletions fuchsia_web/runners/web/web_runner_smoke_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class WebRunnerSmokeTest : public testing::Test {
auto services = fuchsia::sys::ServiceList::New();
services->names = std::move(runner_services);
services->host_directory =
base::ComponentContextForProcess()->svc()->CloneChannel().TakeChannel();
base::ComponentContextForProcess()->svc()->CloneChannel();

fuchsia::sys::EnvironmentPtr runner_environment;
environment->CreateNestedEnvironment(
Expand Down Expand Up @@ -174,7 +174,7 @@ TEST_F(WebRunnerSmokeTest, LifecycleTerminate) {

fuchsia::sys::LaunchInfo launch_info = LaunchInfoWithServices();
launch_info.url = test_server_.GetURL("/test.html").spec();
launch_info.directory_request = directory.NewRequest().TakeChannel();
launch_info.directory_request = directory.NewRequest();

fuchsia::sys::ComponentControllerPtr controller;
GetLauncher()->CreateComponent(std::move(launch_info),
Expand Down
2 changes: 1 addition & 1 deletion fuchsia_web/shell/web_engine_shell.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ fuchsia::web::ContextProviderPtr ConnectToContextProvider(
web_engine_package_name.data());
launch_info.arguments = extra_command_line_arguments;
fidl::InterfaceHandle<fuchsia::io::Directory> service_directory;
launch_info.directory_request = service_directory.NewRequest().TakeChannel();
launch_info.directory_request = service_directory.NewRequest();

launcher->CreateComponent(std::move(launch_info),
component_controller_.NewRequest());
Expand Down
9 changes: 4 additions & 5 deletions fuchsia_web/webengine/context_provider_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ class FakeSysLauncher final : public fuchsia::sys::testing::Launcher_TestBase {
tmp_directory.NewRequest().TakeChannel().release());
ZX_CHECK(status == ZX_OK, status) << "fdio_open(/tmp)";
launch_info.flat_namespace->paths.push_back("/tmp");
launch_info.flat_namespace->directories.push_back(
tmp_directory.TakeChannel());
launch_info.flat_namespace->directories.push_back(std::move(tmp_directory));

// Redirect the sub-process Component's stderr to feed into the test output.
launch_info.err = fuchsia::sys::FileDescriptor::New();
Expand Down Expand Up @@ -258,9 +257,9 @@ class FakeSysEnvironment final
fake_nested_environment_.Bind(std::move(environment_request));
nested_environment_controller_request_ = std::move(controller_request);
}
void GetDirectory(zx::channel request) override {
base::ComponentContextForProcess()->svc()->CloneChannel(
fidl::InterfaceRequest<fuchsia::io::Directory>(std::move(request)));
void GetDirectory(
fidl::InterfaceRequest<::fuchsia::io::Directory> request) override {
base::ComponentContextForProcess()->svc()->CloneChannel(std::move(request));
}

private:
Expand Down
3 changes: 1 addition & 2 deletions fuchsia_web/webengine/test/context_provider_for_test_v1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ fidl::InterfaceHandle<fuchsia::io::Directory> StartWebEngineForTestsInternal(
command_line.argv().begin() + 1, command_line.argv().end()));

fuchsia::io::DirectorySyncPtr web_engine_services_dir;
launch_info.directory_request =
web_engine_services_dir.NewRequest().TakeChannel();
launch_info.directory_request = web_engine_services_dir.NewRequest();

fuchsia::sys::LauncherPtr launcher;
base::ComponentContextForProcess()->svc()->Connect(launcher.NewRequest());
Expand Down
3 changes: 1 addition & 2 deletions fuchsia_web/webengine/test/isolated_archivist_v1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ fidl::InterfaceHandle<fuchsia::io::Directory> StartIsolatedArchivist(
launch_info.url = kArchivistUrl;

fidl::InterfaceHandle<fuchsia::io::Directory> archivist_services_dir;
launch_info.directory_request =
archivist_services_dir.NewRequest().TakeChannel();
launch_info.directory_request = archivist_services_dir.NewRequest();

auto launcher = base::ComponentContextForProcess()
->svc()
Expand Down
17 changes: 8 additions & 9 deletions fuchsia_web/webinstance_host/web_instance_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ bool HandleDataDirectoryParam(fuchsia::web::CreateContextParams* params,
launch_info->flat_namespace->paths.push_back(
base::kPersistedDataDirectoryPath);
launch_info->flat_namespace->directories.push_back(
params->mutable_data_directory()->TakeChannel());
std::move(*params->mutable_data_directory()));
if (params->has_data_quota_bytes()) {
launch_args->AppendSwitchNative(
switches::kDataQuotaBytes,
Expand All @@ -173,7 +173,7 @@ bool HandleCdmDataDirectoryParam(fuchsia::web::CreateContextParams* params,
launch_args->AppendSwitchNative(switches::kCdmDataDirectory, kCdmDataPath);
launch_info->flat_namespace->paths.push_back(kCdmDataPath);
launch_info->flat_namespace->directories.push_back(
params->mutable_cdm_data_directory()->TakeChannel());
std::move(*params->mutable_cdm_data_directory()));
if (params->has_cdm_data_quota_bytes()) {
launch_args->AppendSwitchNative(
switches::kCdmDataQuotaBytes,
Expand Down Expand Up @@ -275,7 +275,7 @@ bool HandleContentDirectoriesParam(fuchsia::web::CreateContextParams* params,
launch_info->flat_namespace->paths.push_back(
kContentDirectories.Append(directory.name()).value());
launch_info->flat_namespace->directories.push_back(
directory.mutable_directory()->TakeChannel());
std::move(*directory.mutable_directory()));
}

launch_args->AppendSwitch(switches::kEnableContentDirectories);
Expand Down Expand Up @@ -649,13 +649,12 @@ zx_status_t WebInstanceHost::CreateInstanceForContextWithCopiedArgs(

if (tmp_dir_.is_valid()) {
launch_info.flat_namespace->paths.push_back("/tmp");
launch_info.flat_namespace->directories.push_back(tmp_dir_.TakeChannel());
launch_info.flat_namespace->directories.push_back(std::move(tmp_dir_));
}

// Create a request for the new instance's service-directory.
fidl::InterfaceHandle<fuchsia::io::Directory> instance_services_handle;
launch_info.directory_request =
instance_services_handle.NewRequest().TakeChannel();
launch_info.directory_request = instance_services_handle.NewRequest();
sys::ServiceDirectory instance_services(std::move(instance_services_handle));

// If one or more Debug protocol clients are active then enable debugging,
Expand All @@ -677,7 +676,7 @@ zx_status_t WebInstanceHost::CreateInstanceForContextWithCopiedArgs(
launch_info.additional_services = fuchsia::sys::ServiceList::New();
launch_info.additional_services->names = GetRequiredServicesForConfig(params);
launch_info.additional_services->host_directory =
service_directory.TakeChannel();
std::move(service_directory);

// Take the accumulated command line arguments, omitting the program name in
// argv[0], and set them in |launch_info|.
Expand Down Expand Up @@ -712,8 +711,8 @@ fuchsia::sys::Launcher* WebInstanceHost::IsolatedEnvironmentLauncher() {
auto services = fuchsia::sys::ServiceList::New();
services->names.push_back(fuchsia::sys::Loader::Name_);
fidl::InterfaceHandle<::fuchsia::io::Directory> services_channel;
environment->GetDirectory(services_channel.NewRequest().TakeChannel());
services->host_directory = services_channel.TakeChannel();
environment->GetDirectory(services_channel.NewRequest());
services->host_directory = std::move(services_channel);

// Instantiate the isolated environment. This ContextProvider instance's PID
// is included in the label to ensure that concurrent service instances
Expand Down

0 comments on commit bf52d9d

Please sign in to comment.