Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Issue 1383283003: Add and use scoped-right-returning wrappers for Mach bootstrap routines (Closed)

Created:
5 years, 2 months ago by Mark Mentovai
Modified:
5 years, 2 months ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

Add and use scoped-right-returning wrappers for Mach bootstrap routines This wraps bootstrap_check_in() in BootstrapCheckIn(), and bootstrap_look_up() in BootstrapLookUp(). The wrappers make it more difficult to accidentally leak a returned right. They’re easier to use, encapsulating common error checking and logging, simplifying all call sites. TEST=crashpad_util_test MachExtensions.BootstrapCheckInAndLookUp R=rsesek@chromium.org Committed: https://chromium.googlesource.com/crashpad/crashpad/+/bb13efbda7ef55bde9a4afa870b4155ead78cd45

Patch Set 1 #

Patch Set 2 : Self-review #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+156 lines, -70 lines) Patch
M test/mac/mach_multiprocess.cc View 4 chunks +11 lines, -21 lines 0 comments Download
M tools/mac/catch_exception_tool.cc View 2 chunks +3 lines, -6 lines 0 comments Download
M tools/mac/exception_port_tool.cc View 1 3 chunks +7 lines, -15 lines 0 comments Download
M util/mach/child_port_handshake.cc View 5 chunks +7 lines, -16 lines 0 comments Download
M util/mach/mach_extensions.h View 2 chunks +25 lines, -0 lines 0 comments Download
M util/mach/mach_extensions.cc View 1 2 chunks +64 lines, -12 lines 2 comments Download
M util/mach/mach_extensions_test.cc View 2 chunks +39 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (1 generated)
Mark Mentovai
5 years, 2 months ago (2015-10-05 17:15:59 UTC) #2
Robert Sesek
LGTM https://codereview.chromium.org/1383283003/diff/20001/util/mach/mach_extensions.cc File util/mach/mach_extensions.cc (right): https://codereview.chromium.org/1383283003/diff/20001/util/mach/mach_extensions.cc#newcode39 util/mach/mach_extensions.cc:39: const char BootstrapCheckInTraits::kName[] = "bootstrap_check_in"; In C++11 this ...
5 years, 2 months ago (2015-10-05 19:00:20 UTC) #3
Mark Mentovai
https://codereview.chromium.org/1383283003/diff/20001/util/mach/mach_extensions.cc File util/mach/mach_extensions.cc (right): https://codereview.chromium.org/1383283003/diff/20001/util/mach/mach_extensions.cc#newcode39 util/mach/mach_extensions.cc:39: const char BootstrapCheckInTraits::kName[] = "bootstrap_check_in"; Robert Sesek wrote: > ...
5 years, 2 months ago (2015-10-05 19:33:03 UTC) #4
Mark Mentovai
5 years, 2 months ago (2015-10-05 21:07:20 UTC) #5
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
bb13efbda7ef55bde9a4afa870b4155ead78cd45 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698