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

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: Add GPU proc as well Created 5 years, 1 month 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: 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..2c25b3e7c6ed43bf38ff9bd9f19214ba0421f04f 100644
--- a/content/child/child_gpu_memory_buffer_manager.cc
+++ b/content/child/child_gpu_memory_buffer_manager.cc
@@ -45,8 +45,8 @@ 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());
reveman 2015/12/01 20:49:04 It would be useful to know what arguments such as
scoped_ptr<GpuMemoryBufferImpl> buffer(GpuMemoryBufferImpl::CreateFromHandle(
handle, size, format, usage,
@@ -54,8 +54,8 @@ ChildGpuMemoryBufferManager::AllocateGpuMemoryBuffer(const gfx::Size& size,
if (!buffer) {
reveman 2015/12/01 20:49:04 This doesn't make sense if we have a CHECK below.
sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer(
handle.id, gpu::SyncToken()));
- return nullptr;
}
+ CHECK(buffer);
return buffer.Pass();
}
« no previous file with comments | « no previous file | content/child/child_io_surface_manager_mac.h » ('j') | content/child/child_io_surface_manager_mac.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698