mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-26 23:01:05 +08:00
[fuchsia] Move to zx_take_startup_handle
This function is just a renamed version of zx_get_startup_handle to clarify the transfer of ownership. Change-Id: Ic83cc592df3a571faebd788b3403ccfebd9ff3b8 Reviewed-on: https://chromium-review.googlesource.com/1099054 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
edc8084c3b
commit
fa47143c8c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user