| Index: third_party/crashpad/crashpad/util/mach/child_port_handshake.cc
|
| diff --git a/third_party/crashpad/crashpad/util/mach/child_port_handshake.cc b/third_party/crashpad/crashpad/util/mach/child_port_handshake.cc
|
| index 51aad9054c63d4d0aca507654ca2d875369aaa74..39286c714843a07b61f82450d79bbc144d03e8da 100644
|
| --- a/third_party/crashpad/crashpad/util/mach/child_port_handshake.cc
|
| +++ b/third_party/crashpad/crashpad/util/mach/child_port_handshake.cc
|
| @@ -98,7 +98,8 @@ mach_port_t ChildPortHandshakeServer::RunServer(
|
| // bootstrap_check_in() to fail.
|
| uint64_t thread_id;
|
| errno = pthread_threadid_np(pthread_self(), &thread_id);
|
| - PCHECK(errno == 0) << "pthread_threadid_np";
|
| + // pthread_threadid_np
|
| + CHECK(errno == 0);
|
| std::string service_name = base::StringPrintf(
|
| "org.chromium.crashpad.child_port_handshake.%d.%llu.%s",
|
| getpid(),
|
| @@ -140,7 +141,8 @@ mach_port_t ChildPortHandshakeServer::RunServer(
|
| // right, and the pipe will show EOF if the client closes its read side
|
| // prematurely.
|
| base::ScopedFD kq(kqueue());
|
| - PCHECK(kq != -1) << "kqueue";
|
| + // kqueue
|
| + CHECK(kq != -1);
|
|
|
| struct kevent changelist[2];
|
| EV_SET(&changelist[0],
|
| @@ -159,7 +161,8 @@ mach_port_t ChildPortHandshakeServer::RunServer(
|
| nullptr);
|
| int rv = HANDLE_EINTR(
|
| kevent(kq.get(), changelist, arraysize(changelist), nullptr, 0, nullptr));
|
| - PCHECK(rv != -1) << "kevent";
|
| + // kevent
|
| + CHECK(rv != -1);
|
|
|
| ChildPortServer child_port_server(this);
|
|
|
| @@ -178,7 +181,8 @@ mach_port_t ChildPortHandshakeServer::RunServer(
|
| const timespec nonblocking_timeout = {};
|
| const timespec* timeout = blocking ? nullptr : &nonblocking_timeout;
|
| rv = HANDLE_EINTR(kevent(kq.get(), nullptr, 0, &event, 1, timeout));
|
| - PCHECK(rv != -1) << "kevent";
|
| + // kevent
|
| + CHECK(rv != -1);
|
|
|
| if (rv == 0) {
|
| // Non-blocking kevent() with no events to return.
|
| @@ -329,24 +333,27 @@ ChildPortHandshake::ChildPortHandshake()
|
| // pipes in Mac OS X 10.6, because the F_SETNOSIGPIPE fcntl() command was not
|
| // introduced until 10.7.
|
| int pipe_fds[2];
|
| - PCHECK(socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_fds) == 0)
|
| - << "socketpair";
|
| + // socketpair
|
| + CHECK(socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pipe_fds) == 0);
|
|
|
| client_read_fd_.reset(pipe_fds[0]);
|
| server_write_fd_.reset(pipe_fds[1]);
|
|
|
| // Simulate pipe() semantics by shutting down the “wrong” sides of the socket.
|
| - PCHECK(shutdown(server_write_fd_.get(), SHUT_RD) == 0) << "shutdown SHUT_RD";
|
| - PCHECK(shutdown(client_read_fd_.get(), SHUT_WR) == 0) << "shutdown SHUT_WR";
|
| + // shutdown SHUT_RD
|
| + CHECK(shutdown(server_write_fd_.get(), SHUT_RD) == 0);
|
| + // shutdown SHUT_WR
|
| + CHECK(shutdown(client_read_fd_.get(), SHUT_WR) == 0);
|
|
|
| // SIGPIPE is undesirable when writing to this pipe. Allow broken-pipe writes
|
| // to fail with EPIPE instead.
|
| const int value = 1;
|
| - PCHECK(setsockopt(server_write_fd_.get(),
|
| - SOL_SOCKET,
|
| - SO_NOSIGPIPE,
|
| - &value,
|
| - sizeof(value)) == 0) << "setsockopt";
|
| + // setsockopt
|
| + CHECK(setsockopt(server_write_fd_.get(),
|
| + SOL_SOCKET,
|
| + SO_NOSIGPIPE,
|
| + &value,
|
| + sizeof(value)) == 0);
|
| }
|
|
|
| ChildPortHandshake::~ChildPortHandshake() {
|
|
|