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

Unified Diff: chrome/nacl/nacl_thread.cc

Issue 2832093: NaCl: Allow setting up multiple sockets for subprocess instead of just one (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: Whitespace fixes Created 10 years, 5 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: chrome/nacl/nacl_thread.cc
diff --git a/chrome/nacl/nacl_thread.cc b/chrome/nacl/nacl_thread.cc
index 33c01954d7c7703853a80d00fe3cb86a8bb3b552..77b78c7df0e2147d3ee170d05bdf7c315ba3c898 100644
--- a/chrome/nacl/nacl_thread.cc
+++ b/chrome/nacl/nacl_thread.cc
@@ -36,8 +36,11 @@ void NaClThread::OnControlMessageReceived(const IPC::Message& msg) {
IPC_END_MESSAGE_MAP()
}
-void NaClThread::OnStartSelLdr(int channel_descriptor,
- nacl::FileDescriptor handle) {
- NaClHandle nacl_handle = nacl::ToNativeHandle(handle);
- NaClMainForChromium(/* handle_count= */ 1, &nacl_handle);
+void NaClThread::OnStartSelLdr(std::vector<nacl::FileDescriptor> handles) {
+ NaClHandle* array = new NaClHandle[handles.size()];
+ for (size_t i = 0; i < handles.size(); i++) {
+ array[i] = nacl::ToNativeHandle(handles[i]);
+ }
+ NaClMainForChromium(static_cast<int>(handles.size()), array);
+ delete array;
}

Powered by Google App Engine
This is Rietveld 408576698