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

Unified Diff: ppapi/proxy/nacl_message_scanner.cc

Issue 418423002: Pepper: Stop using SRPC for irt_open_resource(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 6 years, 3 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 | « ppapi/native_client/src/trusted/plugin/service_runtime.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/nacl_message_scanner.cc
diff --git a/ppapi/proxy/nacl_message_scanner.cc b/ppapi/proxy/nacl_message_scanner.cc
index 1f7882a56698e7b1fc5ff64caed58f2685f5af34..4120beb7457120f8150811a6dda2493fd5f28d71 100644
--- a/ppapi/proxy/nacl_message_scanner.cc
+++ b/ppapi/proxy/nacl_message_scanner.cc
@@ -53,9 +53,12 @@ void WriteHandle(int handle_index,
IPC::Message* msg) {
SerializedHandle::WriteHeader(handle.header(), msg);
- // Now write the handle itself in POSIX style.
- msg->WriteBool(true); // valid == true
- msg->WriteInt(handle_index);
+ if (handle.type() != SerializedHandle::INVALID) {
+ // Now write the handle itself in POSIX style.
+ // See ParamTraits<FileDescriptor>::Read for where these values are read.
+ msg->WriteBool(true); // valid == true
+ msg->WriteInt(handle_index);
+ }
}
// Define overloads for each kind of message parameter that requires special
@@ -318,6 +321,7 @@ bool NaClMessageScanner::ScanMessage(
CASE_FOR_MESSAGE(PpapiMsg_PPBAudio_NotifyAudioStreamCreated)
CASE_FOR_MESSAGE(PpapiMsg_PPPMessaging_HandleMessage)
CASE_FOR_MESSAGE(PpapiPluginMsg_ResourceReply)
+ CASE_FOR_REPLY(PpapiHostMsg_OpenResource)
CASE_FOR_REPLY(PpapiHostMsg_PPBGraphics3D_Create)
CASE_FOR_REPLY(PpapiHostMsg_PPBGraphics3D_CreateTransferBuffer)
CASE_FOR_REPLY(PpapiHostMsg_PPBImageData_CreateSimple)
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/service_runtime.cc ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698