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

Unified Diff: media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.cc

Issue 2843113002: make base::SharedMemoryHandle a class on POSIX. (Closed)
Patch Set: Fix test error. Created 3 years, 8 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
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.

Powered by Google App Engine
This is Rietveld 408576698