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

Unified Diff: content/common/gpu/gpu_memory_buffer_factory_io_surface.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/common/gpu/gpu_memory_buffer_factory_io_surface.cc
diff --git a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
index f8a74d626e63c047b934b34e51e9d22825b0da37..5db66aa2cac1d6f8d17fad6b41056198d47bf18d 100644
--- a/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
+++ b/content/common/gpu/gpu_memory_buffer_factory_io_surface.cc
@@ -50,13 +50,12 @@ GpuMemoryBufferFactoryIOSurface::CreateGpuMemoryBuffer(
gfx::PluginWindowHandle surface_handle) {
base::ScopedCFTypeRef<IOSurfaceRef> io_surface(
gfx::IOSurfaceManager::CreateIOSurface(size, format));
- if (!io_surface)
- return gfx::GpuMemoryBufferHandle();
+ CHECK(io_surface);
reveman 2015/12/01 20:49:04 This makes it possible for a malicious renderer to
- if (!gfx::IOSurfaceManager::GetInstance()->RegisterIOSurface(id, client_id,
- io_surface)) {
- return gfx::GpuMemoryBufferHandle();
- }
+ bool register_result =
+ gfx::IOSurfaceManager::GetInstance()->RegisterIOSurface(id, client_id,
+ io_surface);
+ CHECK(register_result);
reveman 2015/12/01 20:49:04 Is it possible that the browser decides to start a
{
base::AutoLock lock(io_surfaces_lock_);

Powered by Google App Engine
This is Rietveld 408576698