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

Unified Diff: ui/surface/transport_dib_posix.cc

Issue 2875453002: Add a size parameter to SharedMemoryHandle. (Closed)
Patch Set: Fix IPC on POSIX. Created 3 years, 7 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
Index: ui/surface/transport_dib_posix.cc
diff --git a/ui/surface/transport_dib_posix.cc b/ui/surface/transport_dib_posix.cc
index 5f68581d7d0de37d40e1b7b106033674ba81270b..71f8d569bea87976f56a2a62e2252631dc553eb5 100644
--- a/ui/surface/transport_dib_posix.cc
+++ b/ui/surface/transport_dib_posix.cc
@@ -79,10 +79,8 @@ bool TransportDIB::Map() {
if (memory())
return true;
- size_t size;
- bool success = base::SharedMemory::GetSizeFromSharedMemoryHandle(
- shared_memory_.handle(), &size);
- if (!success || !shared_memory_.Map(size))
+ size_t size = shared_memory_.handle().GetSize();
+ if (!shared_memory_.Map(size))
return false;
size_ = size;
« base/memory/shared_memory_mac.cc ('K') | « ui/gfx/mojo/buffer_types_struct_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698