OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/child/child_io_surface_manager_mac.h" | 5 #include "content/child/child_io_surface_manager_mac.h" |
6 | 6 |
7 #include "base/mac/mach_logging.h" | 7 #include "base/mac/mach_logging.h" |
8 #include "content/common/mac/io_surface_manager_messages.h" | 8 #include "content/common/mac/io_surface_manager_messages.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 memcpy(data.request.token_name, token_.name, sizeof(token_.name)); | 122 memcpy(data.request.token_name, token_.name, sizeof(token_.name)); |
123 | 123 |
124 kr = mach_msg(&data.request.header, MACH_SEND_MSG | MACH_RCV_MSG, | 124 kr = mach_msg(&data.request.header, MACH_SEND_MSG | MACH_RCV_MSG, |
125 sizeof(data.request), sizeof(data.reply), reply_port, | 125 sizeof(data.request), sizeof(data.reply), reply_port, |
126 MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); | 126 MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); |
127 if (kr != KERN_SUCCESS) { | 127 if (kr != KERN_SUCCESS) { |
128 MACH_LOG(ERROR, kr) << "mach_msg"; | 128 MACH_LOG(ERROR, kr) << "mach_msg"; |
129 return nullptr; | 129 return nullptr; |
130 } | 130 } |
131 | 131 |
| 132 // Crash the renderer (for now) to see if this was the cause of renderer hangs |
| 133 // that have recently been noticed. |
| 134 // http://crbug.com/532149 |
| 135 CHECK(data.reply.msg.result); |
| 136 |
132 // Deallocate the right after creating an IOSurface reference. | 137 // Deallocate the right after creating an IOSurface reference. |
133 base::mac::ScopedMachSendRight scoped_io_surface_right( | 138 base::mac::ScopedMachSendRight scoped_io_surface_right( |
134 data.reply.msg.io_surface_port.name); | 139 data.reply.msg.io_surface_port.name); |
135 | 140 |
136 return IOSurfaceLookupFromMachPort(scoped_io_surface_right); | 141 return IOSurfaceLookupFromMachPort(scoped_io_surface_right); |
137 } | 142 } |
138 | 143 |
139 ChildIOSurfaceManager::ChildIOSurfaceManager() {} | 144 ChildIOSurfaceManager::ChildIOSurfaceManager() {} |
140 | 145 |
141 ChildIOSurfaceManager::~ChildIOSurfaceManager() {} | 146 ChildIOSurfaceManager::~ChildIOSurfaceManager() {} |
142 | 147 |
143 } // namespace content | 148 } // namespace content |
OLD | NEW |