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

Unified Diff: mojo/edk/embedder/platform_handle.cc

Issue 1712143002: [mojo-edk] Add support for transferring mach ports. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 4 years, 9 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 | « mojo/edk/embedder/platform_handle.h ('k') | mojo/edk/embedder/platform_shared_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/embedder/platform_handle.cc
diff --git a/mojo/edk/embedder/platform_handle.cc b/mojo/edk/embedder/platform_handle.cc
index 62dc850731f087934b7d875f83669bf40cddd59f..5709b1e46850936b7ccff88e3b8f15313bf7bf21 100644
--- a/mojo/edk/embedder/platform_handle.cc
+++ b/mojo/edk/embedder/platform_handle.cc
@@ -29,10 +29,10 @@ void PlatformHandle::CloseIfNecessary() {
handle = -1;
}
#if defined(OS_MACOSX) && !defined(OS_IOS)
- else {
- kern_return_t rv = mach_port_deallocate(mach_task_self(), port);
- DPCHECK(rv == KERN_SUCCESS);
- port = MACH_PORT_NULL;
+ else if (type == Type::MACH) {
+ kern_return_t rv = mach_port_deallocate(mach_task_self(), port);
+ DPCHECK(rv == KERN_SUCCESS);
+ port = MACH_PORT_NULL;
}
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
#elif defined(OS_WIN)
« no previous file with comments | « mojo/edk/embedder/platform_handle.h ('k') | mojo/edk/embedder/platform_shared_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698