OnStartOrStop)
PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_AudioInput_Close, OnClose)
PPAPI_END_MESSAGE_MAP()
+ LOG(ERROR) << "Resource message unresolved";
return PP_ERROR_FAILED;
}
const std::string& device_id,
PP_AudioSampleRate sample_rate,
uint32_t sample_frame_count) {
- if (open_context_.is_valid())
+ if (open_context_.is_valid()) {
+ LOG(ERROR) << "Invalid open context";
return PP_ERROR_INPROGRESS;
- if (audio_input_)
+ }
+ if (audio_input_) {
+ LOG(ERROR) << "Audio input is not NULL";
return PP_ERROR_FAILED;
+ }
GURL document_url = renderer_ppapi_host_->GetDocumentURL(pp_instance());
- if (!document_url.is_valid())
+ if (!document_url.is_valid()) {
+ LOG(ERROR) << "Invalid document URL";
return PP_ERROR_FAILED;
+ }
// When it is done, we'll get called back on StreamCreated() or
// StreamCreationFailed().
open_context_ = context->MakeReplyMessageContext();
return PP_OK_COMPLETIONPENDING;
} else {
+ LOG(ERROR) << "Audio input is NULL";
return PP_ERROR_FAILED;
}
}
int32_t PepperAudioInputHost::OnStartOrStop(
ppapi::host::HostMessageContext* /* context */,
bool capture) {
- if (!audio_input_)
+ if (!audio_input_) {
+ LOG(ERROR) << "Audio input is NULL";
return PP_ERROR_FAILED;
+ }
if (capture)
audio_input_->StartCapture();
else
base::ReadOnlySharedMemoryRegion* remote_shared_memory_region) {
*remote_socket_handle =
renderer_ppapi_host_->ShareHandleWithRemote(socket.handle(), false);
- if (*remote_socket_handle == IPC::InvalidPlatformFileForTransit())
+ if (*remote_socket_handle == IPC::InvalidPlatformFileForTransit()) {
+ LOG(ERROR) << "Invalid platform file for transit";
return PP_ERROR_FAILED;
+ }
*remote_shared_memory_region =
renderer_ppapi_host_->ShareReadOnlySharedMemoryRegionWithRemote(
shared_memory_region);
- if (!remote_shared_memory_region->IsValid())
+ if (!remote_shared_memory_region->IsValid()) {
+ LOG(ERROR) << "Invalid region for shared memory";
return PP_ERROR_FAILED;
+ }
return PP_OK;
}