| Index: ppapi/proxy/ppb_audio_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_audio_proxy.cc b/ppapi/proxy/ppb_audio_proxy.cc
|
| index f60ac812127e96804d053ddf7ac1e5d76cc8014b..98eb4bb65ee1cd530dad059246300609774e5fcd 100644
|
| --- a/ppapi/proxy/ppb_audio_proxy.cc
|
| +++ b/ppapi/proxy/ppb_audio_proxy.cc
|
| @@ -252,9 +252,11 @@ void PPB_Audio_Proxy::AudioChannelConnected(
|
| // inconvenient to clean up. Our IPC code will automatically handle this for
|
| // us, as long as the remote side always closes the handles it receives
|
| // (in OnMsgNotifyAudioStreamCreated), even in the failure case.
|
| + ppapi::proxy::SerializedFileDescriptor fd_wrapper = { socket_handle };
|
| + ppapi::proxy::SerializedSharedMemoryHandle handle_wrapper =
|
| + { shared_memory, shared_memory_length + sizeof(int32) };
|
| dispatcher()->Send(new PpapiMsg_PPBAudio_NotifyAudioStreamCreated(
|
| - API_ID_PPB_AUDIO, resource, result_code, socket_handle,
|
| - shared_memory, shared_memory_length));
|
| + API_ID_PPB_AUDIO, resource, result_code, fd_wrapper, handle_wrapper));
|
| }
|
|
|
| int32_t PPB_Audio_Proxy::GetAudioConnectedHandles(
|
| @@ -299,21 +301,21 @@ int32_t PPB_Audio_Proxy::GetAudioConnectedHandles(
|
| void PPB_Audio_Proxy::OnMsgNotifyAudioStreamCreated(
|
| const HostResource& audio_id,
|
| int32_t result_code,
|
| - IPC::PlatformFileForTransit socket_handle,
|
| - base::SharedMemoryHandle handle,
|
| - uint32_t length) {
|
| + ppapi::proxy::SerializedFileDescriptor socket_handle,
|
| + ppapi::proxy::SerializedSharedMemoryHandle handle) {
|
| EnterPluginFromHostResource<PPB_Audio_API> enter(audio_id);
|
| if (enter.failed() || result_code != PP_OK) {
|
| // The caller may still have given us these handles in the failure case.
|
| // The easiest way to clean these up is to just put them in the objects
|
| // and then close them. This failure case is not performance critical.
|
| base::SyncSocket temp_socket(
|
| - IPC::PlatformFileForTransitToPlatformFile(socket_handle));
|
| - base::SharedMemory temp_mem(handle, false);
|
| + IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor));
|
| + base::SharedMemory temp_mem(handle.handle, false);
|
| } else {
|
| static_cast<Audio*>(enter.object())->SetStreamInfo(
|
| - enter.resource()->pp_instance(), handle, length,
|
| - IPC::PlatformFileForTransitToPlatformFile(socket_handle));
|
| + enter.resource()->pp_instance(), handle.handle,
|
| + length - sizeof(uint32_t),
|
| + IPC::PlatformFileForTransitToPlatformFile(socket_handle.descriptor));
|
| }
|
| }
|
|
|
|
|