Chromium Code Reviews| Index: sandbox/win/tools/launcher/launcher.cc |
| diff --git a/sandbox/win/tools/launcher/launcher.cc b/sandbox/win/tools/launcher/launcher.cc |
| index 4f39822ec48f81ead9d51327948064367539db68..a037702a43ca5a7b9444fd174dfb6f62bcbb73a4 100644 |
| --- a/sandbox/win/tools/launcher/launcher.cc |
| +++ b/sandbox/win/tools/launcher/launcher.cc |
| @@ -102,17 +102,19 @@ DWORD StartRestrictedProcessInJob(wchar_t* command_line, |
| { |
| HANDLE temp_thread = process_info.thread_handle(); |
| if (!::SetThreadToken(&temp_thread, impersonation_token.Get())) { |
| + auto last_error = ::GetLastError(); |
|
brucedawson
2015/09/12 00:33:56
I assume that we want the SetThreadToken error, no
|
| ::TerminateProcess(process_info.process_handle(), |
| 0); // exit code |
| - return ::GetLastError(); |
| + return last_error; |
| } |
| } |
| err_code = job.AssignProcessToJob(process_info.process_handle()); |
| if (ERROR_SUCCESS != err_code) { |
| + auto last_error = ::GetLastError(); |
| ::TerminateProcess(process_info.process_handle(), |
| 0); // exit code |
| - return ::GetLastError(); |
| + return last_error; |
| } |
| // Start the application |