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

Unified Diff: ipc/test_util_mac.cc

Issue 1397023002: ipc: Write end-to-end tests for SharedMemoryHandle brokering on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Win compile errors. Created 5 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 | « ipc/test_util_mac.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/test_util_mac.cc
diff --git a/ipc/test_util_mac.cc b/ipc/test_util_mac.cc
index 59e037ba2953322c65cc43f8714cd3971d92c888..4639b13babe9f90ab8fd524c7d390c53b973797c 100644
--- a/ipc/test_util_mac.cc
+++ b/ipc/test_util_mac.cc
@@ -100,6 +100,15 @@ mach_msg_type_number_t GetActiveNameCount() {
return names_count;
}
+mach_port_urefs_t GetMachRefCount(mach_port_name_t name,
+ mach_port_right_t right) {
+ mach_port_urefs_t ref_count;
+ kern_return_t kr = mach_port_get_refs(mach_task_self(), name,
+ MACH_PORT_RIGHT_SEND, &ref_count);
+ MACH_CHECK(kr == KERN_SUCCESS, kr) << "GetRefCount";
+ return ref_count;
+}
+
void IncrementMachRefCount(mach_port_name_t name, mach_port_right_t right) {
kern_return_t kr = mach_port_mod_refs(mach_task_self(), name, right, 1);
MACH_CHECK(kr == KERN_SUCCESS, kr) << "GetRefCount";
« no previous file with comments | « ipc/test_util_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698