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

Unified Diff: content/child/child_gpu_memory_buffer_manager.cc

Issue 1507893004: Revert of Mac: Require child AllocateGpuMemoryBuffer to not fail (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 21a512f319453169e1e7632c6b96168355829a53..c83ceea64155878cb1e3e3ae0de17bff2c53f002 100644
--- a/content/child/child_gpu_memory_buffer_manager.cc
+++ b/content/child/child_gpu_memory_buffer_manager.cc
@@ -45,13 +45,18 @@
content::GetNextGenericSharedMemoryId(), size.width(), size.height(),
format, usage, &handle);
bool success = sender_->Send(message);
- CHECK(success);
- CHECK(!handle.is_null());
+ if (!success || handle.is_null())
+ return nullptr;
scoped_ptr<GpuMemoryBufferImpl> buffer(GpuMemoryBufferImpl::CreateFromHandle(
handle, size, format, usage,
base::Bind(&DeletedGpuMemoryBuffer, sender_, handle.id)));
- CHECK(buffer);
+ if (!buffer) {
+ sender_->Send(new ChildProcessHostMsg_DeletedGpuMemoryBuffer(
+ handle.id, gpu::SyncToken()));
+ return nullptr;
+ }
+
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