OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 } | 1182 } |
1183 base::win::ScopedHandle process_handle(temp_handle); | 1183 base::win::ScopedHandle process_handle(temp_handle); |
1184 | 1184 |
1185 attach_debug_exception_handler_reply_msg_.reset(reply_msg); | 1185 attach_debug_exception_handler_reply_msg_.reset(reply_msg); |
1186 // If the NaCl loader is 64-bit, the process running its debug | 1186 // If the NaCl loader is 64-bit, the process running its debug |
1187 // exception handler must be 64-bit too, so we use the 64-bit NaCl | 1187 // exception handler must be 64-bit too, so we use the 64-bit NaCl |
1188 // broker process for this. Otherwise, on a 32-bit system, we use | 1188 // broker process for this. Otherwise, on a 32-bit system, we use |
1189 // the 32-bit browser process to run the debug exception handler. | 1189 // the 32-bit browser process to run the debug exception handler. |
1190 if (RunningOnWOW64()) { | 1190 if (RunningOnWOW64()) { |
1191 return NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( | 1191 return NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( |
1192 weak_factory_.GetWeakPtr(), nacl_pid, process_handle, info); | 1192 weak_factory_.GetWeakPtr(), nacl_pid, process_handle.Get(), |
| 1193 info); |
1193 } else { | 1194 } else { |
1194 NaClStartDebugExceptionHandlerThread( | 1195 NaClStartDebugExceptionHandlerThread( |
1195 process_handle.Take(), info, | 1196 process_handle.Take(), info, |
1196 base::MessageLoopProxy::current(), | 1197 base::MessageLoopProxy::current(), |
1197 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1198 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1198 weak_factory_.GetWeakPtr())); | 1199 weak_factory_.GetWeakPtr())); |
1199 return true; | 1200 return true; |
1200 } | 1201 } |
1201 } | 1202 } |
1202 #endif | 1203 #endif |
1203 | 1204 |
1204 } // namespace nacl | 1205 } // namespace nacl |
OLD | NEW |