Index: mojo/edk/system/node_channel.cc |
diff --git a/mojo/edk/system/node_channel.cc b/mojo/edk/system/node_channel.cc |
index 25488602b203db4936c466f5da73d2282f900e13..95b7ebcff598aeba04fafcb83adb02ff454fdbb2 100644 |
--- a/mojo/edk/system/node_channel.cc |
+++ b/mojo/edk/system/node_channel.cc |
@@ -416,7 +416,7 @@ void NodeChannel::OnChannelMessage(const void* payload, |
handle.owning_process = remote_process_handle_; |
if (!Channel::Message::RewriteHandles(remote_process_handle_, |
base::GetCurrentProcessHandle(), |
- handles->data(), handles->size())) { |
+ handles.get())) { |
DLOG(ERROR) << "Received one or more invalid handles."; |
} |
} else if (handles) { |
@@ -728,11 +728,12 @@ void NodeChannel::WriteChannelMessage(Channel::MessagePtr message) { |
// Rewrite outgoing handles if we have a handle to the destination process. |
if (remote_process_handle != base::kNullProcessHandle) { |
+ ScopedPlatformHandleVectorPtr handles = message->TakeHandles(); |
if (!message->RewriteHandles(base::GetCurrentProcessHandle(), |
Ken Rockot(use gerrit already)
2016/05/25 15:48:12
nit: While you're here please update this call sit
Anand Mistry (off Chromium)
2016/05/25 23:36:38
Done.
|
- remote_process_handle, message->handles(), |
- message->num_handles())) { |
+ remote_process_handle, handles.get())) { |
DLOG(ERROR) << "Failed to duplicate one or more outgoing handles."; |
} |
+ message->SetHandles(std::move(handles)); |
} |
} |
#elif defined(OS_MACOSX) && !defined(OS_IOS) |