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

Unified Diff: util/mach/exception_ports.h

Issue 649713002: Use the correct null constants for Mach threads, tasks, and hosts (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/mach/exc_server_variants_test.cc ('k') | util/mach/exception_ports.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/exception_ports.h
diff --git a/util/mach/exception_ports.h b/util/mach/exception_ports.h
index bd8212ce5e93f9d2480b534a659a8fc2d19539b8..2c4983d722e65f11e03f4fa112a63d38df5186e6 100644
--- a/util/mach/exception_ports.h
+++ b/util/mach/exception_ports.h
@@ -97,10 +97,11 @@ class ExceptionPorts {
//! port must be a send right to a port of the type specified in \a
//! target_type. In this case, ownership of \a target_port is not given to
//! the new ExceptionPorts object. \a target_port may also be
- //! `MACH_PORT_NULL`, in which case `mach_host_self()`,
- //! `mach_task_self()`, or `mach_thread_self()` will be used as the target
- //! port depending on the value of \a target_type. In this case, ownership
- //! of the target port will be managed appropriately for \a target_type.
+ //! `HOST_NULL`, `TASK_NULL`, or `THREAD_NULL`, in which case
+ //! `mach_host_self()`, `mach_task_self()`, or `mach_thread_self()` will
+ //! be used as the target port depending on the value of \a target_type.
+ //! In this case, ownership of the target port will be managed
+ //! appropriately for \a target_type.
ExceptionPorts(TargetType target_type, mach_port_t target_port);
~ExceptionPorts();
@@ -172,10 +173,10 @@ class ExceptionPorts {
mach_port_t target_port_;
// If true, target_port_ will be deallocated in the destructor. This will
- // always be false when the user provides a non-MACH_PORT_NULL target_port to
- // the constructor. It will also be false when target_type is kTargetTypeTask,
- // even with a MACH_PORT_NULL target_port, because it is incorrect to
- // deallocate the result of mach_task_self().
+ // always be false when the user provides a non-null target_port to the
+ // constructor. It will also be false when target_type is kTargetTypeTask,
+ // even with a TASK_NULL target_port, because it is incorrect to deallocate
+ // the result of mach_task_self().
bool dealloc_target_port_;
DISALLOW_COPY_AND_ASSIGN(ExceptionPorts);
« no previous file with comments | « util/mach/exc_server_variants_test.cc ('k') | util/mach/exception_ports.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698