Index: content/child/child_gpu_memory_buffer_manager.cc |
diff --git a/content/child/child_gpu_memory_buffer_manager.cc b/content/child/child_gpu_memory_buffer_manager.cc |
index c83ceea64155878cb1e3e3ae0de17bff2c53f002..21a512f319453169e1e7632c6b96168355829a53 100644 |
--- a/content/child/child_gpu_memory_buffer_manager.cc |
+++ b/content/child/child_gpu_memory_buffer_manager.cc |
@@ -45,18 +45,13 @@ ChildGpuMemoryBufferManager::AllocateGpuMemoryBuffer(const gfx::Size& size, |
content::GetNextGenericSharedMemoryId(), size.width(), size.height(), |
format, usage, &handle); |
bool success = sender_->Send(message); |
- if (!success || handle.is_null()) |
- return nullptr; |
+ CHECK(success); |
+ CHECK(!handle.is_null()); |
scoped_ptr<GpuMemoryBufferImpl> buffer(GpuMemoryBufferImpl::CreateFromHandle( |
handle, size, format, usage, |
base::Bind(&DeletedGpuMemoryBuffer, sender_, handle.id))); |
- if (!buffer) { |
- sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer( |
- handle.id, gpu::SyncToken())); |
- return nullptr; |
- } |
- |
+ CHECK(buffer); |
reveman
2015/12/04 01:47:04
nit: I don't think this should be able to fail unl
ccameron
2015/12/04 02:36:20
I could picture it failing if, for instance, IOSur
|
return buffer.Pass(); |
} |