| Index: ui/gfx/mojo/buffer_types_traits.cc
|
| diff --git a/ui/gfx/mojo/buffer_types_traits.cc b/ui/gfx/mojo/buffer_types_traits.cc
|
| index 122d844079e0c056813829de1698a055219e8cec..42fa1b824e1e36effc1df93e5b53eb260e1c651e 100644
|
| --- a/ui/gfx/mojo/buffer_types_traits.cc
|
| +++ b/ui/gfx/mojo/buffer_types_traits.cc
|
| @@ -63,17 +63,16 @@ bool StructTraits<
|
| mojo::ScopedHandle StructTraits<gfx::mojom::GpuMemoryBufferHandleDataView,
|
| gfx::GpuMemoryBufferHandle>::
|
| shared_memory_handle(const gfx::GpuMemoryBufferHandle& handle) {
|
| + if (handle.is_null())
|
| + return mojo::ScopedHandle();
|
| base::PlatformFile platform_file = base::kInvalidPlatformFile;
|
| #if defined(OS_WIN)
|
| platform_file = handle.handle.GetHandle();
|
| #elif defined(OS_MACOSX) || defined(OS_IOS)
|
| NOTIMPLEMENTED();
|
| #else
|
| - DCHECK(handle.handle.auto_close || handle.handle.fd == -1);
|
| platform_file = handle.handle.fd;
|
| #endif
|
| - if (platform_file == base::kInvalidPlatformFile)
|
| - return mojo::ScopedHandle();
|
| return mojo::WrapPlatformFile(platform_file);
|
| }
|
|
|
|
|