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 <string.h> | 7 #include <string.h> |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1329 // If the NaCl loader is 64-bit, the process running its debug | 1329 // If the NaCl loader is 64-bit, the process running its debug |
1330 // exception handler must be 64-bit too, so we use the 64-bit NaCl | 1330 // exception handler must be 64-bit too, so we use the 64-bit NaCl |
1331 // broker process for this. Otherwise, on a 32-bit system, we use | 1331 // broker process for this. Otherwise, on a 32-bit system, we use |
1332 // the 32-bit browser process to run the debug exception handler. | 1332 // the 32-bit browser process to run the debug exception handler. |
1333 if (RunningOnWOW64()) { | 1333 if (RunningOnWOW64()) { |
1334 return NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( | 1334 return NaClBrokerService::GetInstance()->LaunchDebugExceptionHandler( |
1335 weak_factory_.GetWeakPtr(), nacl_pid, process.Handle(), | 1335 weak_factory_.GetWeakPtr(), nacl_pid, process.Handle(), |
1336 info); | 1336 info); |
1337 } else { | 1337 } else { |
1338 NaClStartDebugExceptionHandlerThread( | 1338 NaClStartDebugExceptionHandlerThread( |
1339 process.Pass(), info, base::ThreadTaskRunnerHandle::Get(), | 1339 std::move(process), info, base::ThreadTaskRunnerHandle::Get(), |
1340 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1340 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1341 weak_factory_.GetWeakPtr())); | 1341 weak_factory_.GetWeakPtr())); |
1342 return true; | 1342 return true; |
1343 } | 1343 } |
1344 } | 1344 } |
1345 #endif | 1345 #endif |
1346 | 1346 |
1347 } // namespace nacl | 1347 } // namespace nacl |
OLD | NEW |