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

Unified Diff: util/mach/exception_ports.cc

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/exception_ports.h ('k') | util/mach/exception_ports_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mach/exception_ports.cc
diff --git a/util/mach/exception_ports.cc b/util/mach/exception_ports.cc
index 2ebfacf12fa3335a7e054022fb2fc81baddbd825..33b517d3f5da20a9afb657959666a21167c768ca 100644
--- a/util/mach/exception_ports.cc
+++ b/util/mach/exception_ports.cc
@@ -26,7 +26,7 @@ ExceptionPorts::ExceptionPorts(TargetType target_type, mach_port_t target_port)
get_exception_ports_ = host_get_exception_ports;
set_exception_ports_ = host_set_exception_ports;
target_name_ = "host";
- if (target_port_ == MACH_PORT_NULL) {
+ if (target_port_ == HOST_NULL) {
target_port_ = mach_host_self();
dealloc_target_port_ = true;
}
@@ -36,7 +36,7 @@ ExceptionPorts::ExceptionPorts(TargetType target_type, mach_port_t target_port)
get_exception_ports_ = task_get_exception_ports;
set_exception_ports_ = task_set_exception_ports;
target_name_ = "task";
- if (target_port_ == MACH_PORT_NULL) {
+ if (target_port_ == TASK_NULL) {
target_port_ = mach_task_self();
// Don’t deallocate mach_task_self().
}
@@ -46,7 +46,7 @@ ExceptionPorts::ExceptionPorts(TargetType target_type, mach_port_t target_port)
get_exception_ports_ = thread_get_exception_ports;
set_exception_ports_ = thread_set_exception_ports;
target_name_ = "thread";
- if (target_port_ == MACH_PORT_NULL) {
+ if (target_port_ == THREAD_NULL) {
target_port_ = mach_thread_self();
dealloc_target_port_ = true;
}
« no previous file with comments | « util/mach/exception_ports.h ('k') | util/mach/exception_ports_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698