| Index: ppapi/proxy/serialized_structs.cc
|
| ===================================================================
|
| --- ppapi/proxy/serialized_structs.cc (revision 154143)
|
| +++ ppapi/proxy/serialized_structs.cc (working copy)
|
| @@ -102,8 +102,9 @@
|
| }
|
|
|
| SerializedHandle::SerializedHandle(
|
| + Type type,
|
| const IPC::PlatformFileForTransit& socket_descriptor)
|
| - : type_(SOCKET),
|
| + : type_(type),
|
| shm_handle_(base::SharedMemory::NULLHandle()),
|
| size_(0),
|
| descriptor_(socket_descriptor) {
|
| @@ -112,8 +113,8 @@
|
| bool SerializedHandle::IsHandleValid() const {
|
| if (type_ == SHARED_MEMORY)
|
| return base::SharedMemory::IsHandleValid(shm_handle_);
|
| - else if (type_ == SOCKET)
|
| - return (IPC::InvalidPlatformFileForTransit() == descriptor_);
|
| + else if (type_ == SOCKET || type_ == CHANNEL_HANDLE)
|
| + return !(IPC::InvalidPlatformFileForTransit() == descriptor_);
|
| return false;
|
| }
|
|
|
| @@ -145,8 +146,7 @@
|
| break;
|
| }
|
| case SOCKET:
|
| - valid_type = true;
|
| - break;
|
| + case CHANNEL_HANDLE:
|
| case INVALID:
|
| valid_type = true;
|
| break;
|
|
|