| Index: content/child/child_io_surface_manager_mac.cc
|
| diff --git a/content/child/child_io_surface_manager_mac.cc b/content/child/child_io_surface_manager_mac.cc
|
| index ebad42ad5b42c1d54322c2f59d5f340235848837..37dc971d30143ac90933dd103433789dafe18187 100644
|
| --- a/content/child/child_io_surface_manager_mac.cc
|
| +++ b/content/child/child_io_surface_manager_mac.cc
|
| @@ -99,10 +99,7 @@ IOSurfaceRef ChildIOSurfaceManager::AcquireIOSurface(
|
| mach_port_t reply_port;
|
| kern_return_t kr = mach_port_allocate(mach_task_self(),
|
| MACH_PORT_RIGHT_RECEIVE, &reply_port);
|
| - if (kr != KERN_SUCCESS) {
|
| - MACH_LOG(ERROR, kr) << "mach_port_allocate";
|
| - return nullptr;
|
| - }
|
| + CHECK_EQ(KERN_SUCCESS, kr);
|
| base::mac::ScopedMachReceiveRight scoped_receive_right(reply_port);
|
|
|
| union {
|
| @@ -124,20 +121,17 @@ IOSurfaceRef ChildIOSurfaceManager::AcquireIOSurface(
|
| kr = mach_msg(&data.request.header, MACH_SEND_MSG | MACH_RCV_MSG,
|
| sizeof(data.request), sizeof(data.reply), reply_port,
|
| MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
|
| - if (kr != KERN_SUCCESS) {
|
| - MACH_LOG(ERROR, kr) << "mach_msg";
|
| - return nullptr;
|
| - }
|
| - if (!data.reply.msg.result) {
|
| - DLOG(ERROR) << "Browser refused AcquireIOSurface request";
|
| - return nullptr;
|
| - }
|
| + CHECK_EQ(KERN_SUCCESS, kr);
|
| + CHECK(data.reply.msg.result);
|
|
|
| // Deallocate the right after creating an IOSurface reference.
|
| base::mac::ScopedMachSendRight scoped_io_surface_right(
|
| data.reply.msg.io_surface_port.name);
|
|
|
| - return IOSurfaceLookupFromMachPort(scoped_io_surface_right.get());
|
| + IOSurfaceRef io_surface =
|
| + IOSurfaceLookupFromMachPort(scoped_io_surface_right.get());
|
| + CHECK(io_surface);
|
| + return io_surface;
|
| }
|
|
|
| ChildIOSurfaceManager::ChildIOSurfaceManager() {}
|
|
|