Index: media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc |
diff --git a/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc b/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc |
index ec2a43364fdda591d741659aec1e822ca6a36ce9..70ab13063be8f6cba2609679ff7ee820c7a1b49b 100644 |
--- a/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc |
+++ b/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc |
@@ -178,9 +178,8 @@ void GpuJpegDecodeAcceleratorHost::Decode( |
if (!base::SharedMemory::IsHandleValid(output_handle)) { |
DLOG(ERROR) << "Failed to duplicate handle of VideoFrame"; |
#if defined(OS_POSIX) && !defined(OS_MACOSX) |
- if (input_handle.auto_close) { |
- // Defer closing task to the ScopedFD. |
- base::ScopedFD(input_handle.fd); |
+ if (input_handle.OwnershipPassesToIPC()) { |
+ input_handle.Close(); |
} |
#else |
// TODO(kcwu) fix the handle leak after crbug.com/493414 resolved. |