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

Unified Diff: content/child/child_gpu_memory_buffer_manager.cc

Issue 1486873002: Mac: Require child AllocateGpuMemoryBuffer to not fail (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just crash ChildGpuMemoryBufferManager::AllocateGpuMemoryBuffer Created 5 years 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698