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

Unified Diff: mojo/edk/system/channel_win.cc

Issue 1759033002: Re-land: [mojo-edk] Serialise windows handles into an "extra header" section. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
« mojo/edk/system/channel.h ('K') | « mojo/edk/system/channel_posix.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/channel_win.cc
diff --git a/mojo/edk/system/channel_win.cc b/mojo/edk/system/channel_win.cc
index 367883540c2e5b64361fb4230ac469e08ed71388..1eeb2f644fe3ace5f2acb1f354f35de61d7c787a 100644
--- a/mojo/edk/system/channel_win.cc
+++ b/mojo/edk/system/channel_win.cc
@@ -121,17 +121,15 @@ class ChannelWin : public Channel,
ScopedPlatformHandleVectorPtr GetReadPlatformHandles(
size_t num_handles,
- void** payload,
- size_t* payload_size) override {
+ const void* extra_header,
+ size_t extra_header_size) override {
size_t handles_size = sizeof(PlatformHandle) * num_handles;
- if (handles_size > *payload_size)
+ if (handles_size > extra_header_size)
return nullptr;
- *payload_size -= handles_size;
ScopedPlatformHandleVectorPtr handles(
new PlatformHandleVector(num_handles));
- memcpy(handles->data(),
- static_cast<const char*>(*payload) + *payload_size, handles_size);
+ memcpy(handles->data(), extra_header, handles_size);
return handles;
}
« mojo/edk/system/channel.h ('K') | « mojo/edk/system/channel_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698