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

Unified Diff: util/mach/exception_ports.cc

Issue 584223002: ExceptionPorts test: accept a port of MACH_PORT_NULL as “no handler.” (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback Created 6 years, 3 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') | no next file » | 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 b96517c64bdbc513777eb12ebdfc9e962bef4fa7..2ebfacf12fa3335a7e054022fb2fc81baddbd825 100644
--- a/util/mach/exception_ports.cc
+++ b/util/mach/exception_ports.cc
@@ -99,12 +99,14 @@ bool ExceptionPorts::GetExceptionPorts(
handlers->clear();
for (mach_msg_type_number_t index = 0; index < handler_count; ++index) {
- ExceptionHandler handler;
- handler.mask = masks[index];
- handler.port = ports[index];
- handler.behavior = behaviors[index];
- handler.flavor = flavors[index];
- handlers->push_back(handler);
+ if (ports[index] != MACH_PORT_NULL) {
+ ExceptionHandler handler;
+ handler.mask = masks[index];
+ handler.port = ports[index];
+ handler.behavior = behaviors[index];
+ handler.flavor = flavors[index];
+ handlers->push_back(handler);
+ }
}
return true;
« no previous file with comments | « util/mach/exception_ports.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698