Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Unified Diff: sandbox/src/Wow64.cc

Issue 10493002: Revert 130716 - Use ScopedProcessInformation and other RAII types in sandbox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sandbox/src/broker_services.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/Wow64.cc
===================================================================
--- sandbox/src/Wow64.cc (revision 140102)
+++ sandbox/src/Wow64.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,7 +8,6 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
-#include "base/win/scoped_process_information.h"
#include "base/win/windows_version.h"
#include "sandbox/src/target_process.h"
@@ -157,17 +156,19 @@
STARTUPINFO startup_info = {0};
startup_info.cb = sizeof(startup_info);
- base::win::ScopedProcessInformation process_info;
+ PROCESS_INFORMATION process_info;
if (!::CreateProcess(NULL, writable_command.get(), NULL, NULL, FALSE, 0, NULL,
- NULL, &startup_info, process_info.Receive()))
+ NULL, &startup_info, &process_info))
return false;
- DWORD reason = ::WaitForSingleObject(process_info.process_handle(), INFINITE);
+ DWORD reason = ::WaitForSingleObject(process_info.hProcess, INFINITE);
DWORD code;
- bool ok =
- ::GetExitCodeProcess(process_info.process_handle(), &code) ? true : false;
+ bool ok = ::GetExitCodeProcess(process_info.hProcess, &code) ? true : false;
+ ::CloseHandle(process_info.hProcess);
+ ::CloseHandle(process_info.hThread);
+
if (WAIT_TIMEOUT == reason)
return false;
« no previous file with comments | « no previous file | sandbox/src/broker_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698