Commit 40dc4360 authored by Kevin Marshall's avatar Kevin Marshall Committed by Commit Bot

Fuchsia: Roll Fuchsia SDK from 2ddc73f to ad481e2.

* Fix to broken host tool "fvm verify" tested (outcome: works).
* SDK method rename; "zx_get_startup_handle" to "zx_take_startup_handle".

Bug: 852876,707030
Change-Id: Ib635c807ae92dedc76c65c34ab9d3829e8a7e5c0
Reviewed-on: https://chromium-review.googlesource.com/1102834Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Reviewed-by: default avatarScott Graham <scottmg@chromium.org>
Commit-Queue: Kevin Marshall <kmarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567853}
parent ef440ae9
......@@ -34,7 +34,7 @@ ServicesDirectory::~ServicesDirectory() {
// static
ServicesDirectory* ServicesDirectory::GetDefault() {
static base::NoDestructor<ServicesDirectory> directory(
zx::channel(zx_get_startup_handle(PA_DIRECTORY_REQUEST)));
zx::channel(zx_take_startup_handle(PA_DIRECTORY_REQUEST)));
return directory.get();
}
......
......@@ -188,8 +188,9 @@ struct BASE_EXPORT LaunchOptions {
// Specifies additional handles to transfer (not duplicate) to the child
// process. Each entry is an <id,handle> pair, with an |id| created using the
// PA_HND() macro. The child retrieves the handle |zx_get_startup_handle(id)|.
// The supplied handles are consumed by LaunchProcess() even on failure.
// PA_HND() macro. The child retrieves the handle
// |zx_take_startup_handle(id)|. The supplied handles are consumed by
// LaunchProcess() even on failure.
HandlesToTransferVector handles_to_transfer;
// Specifies which basic capabilities to grant to the child process.
......
......@@ -941,7 +941,7 @@ TEST_F(ProcessUtilTest, FDRemappingIncludesStdio) {
const uint16_t kStartupHandleId = 43;
MULTIPROCESS_TEST_MAIN(ProcessUtilsVerifyHandle) {
zx_handle_t handle =
zx_get_startup_handle(PA_HND(PA_USER0, kStartupHandleId));
zx_take_startup_handle(PA_HND(PA_USER0, kStartupHandleId));
CHECK_NE(ZX_HANDLE_INVALID, handle);
// Write to the pipe so the parent process can observe output.
......
2ddc73f5afdf3d6a27f1ada322bd1a4370858ccf
\ No newline at end of file
ad481e2a17e6557d794dfbfb6f929affffd3c1e2
......@@ -61,7 +61,7 @@ PlatformChannelPair::PassClientHandleFromParentProcessFromString(
return ScopedInternalPlatformHandle();
}
return ScopedInternalPlatformHandle(InternalPlatformHandle::ForHandle(
zx_get_startup_handle(base::checked_cast<uint32_t>(id))));
zx_take_startup_handle(base::checked_cast<uint32_t>(id))));
}
void PlatformChannelPair::PrepareToPassClientHandleToChildProcess(
......
......@@ -238,7 +238,7 @@ PlatformChannelEndpoint PlatformChannel::RecoverPassedEndpointFromString(
return PlatformChannelEndpoint();
}
return PlatformChannelEndpoint(PlatformHandle(base::ScopedZxHandle(
zx_get_startup_handle(base::checked_cast<uint32_t>(handle_value)))));
zx_take_startup_handle(base::checked_cast<uint32_t>(handle_value)))));
#elif defined(OS_ANDROID)
base::GlobalDescriptors::Key key = -1;
if (value.empty() || !base::StringToUint(value, &key)) {
......
......@@ -939,18 +939,18 @@ int HandlerMain(int argc,
}
#elif defined(OS_FUCHSIA)
// These handles are logically "moved" into these variables when retrieved by
// zx_get_startup_handle(). Both are given to ExceptionHandlerServer which
// zx_take_startup_handle(). Both are given to ExceptionHandlerServer which
// owns them in this process. There is currently no "connect-later" mode on
// Fuchsia, all the binding must be done by the client before starting
// crashpad_handler.
base::ScopedZxHandle root_job(zx_get_startup_handle(PA_HND(PA_USER0, 0)));
base::ScopedZxHandle root_job(zx_take_startup_handle(PA_HND(PA_USER0, 0)));
if (!root_job.is_valid()) {
LOG(ERROR) << "no process handle passed in startup handle 0";
return EXIT_FAILURE;
}
base::ScopedZxHandle exception_port(
zx_get_startup_handle(PA_HND(PA_USER0, 1)));
zx_take_startup_handle(PA_HND(PA_USER0, 1)));
if (!exception_port.is_valid()) {
LOG(ERROR) << "no exception port handle passed in startup handle 1";
return EXIT_FAILURE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment