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

Unified Diff: util/win/scoped_process_suspend_test.cc

Issue 1337653005: win: Fix use of THREAD_ALL_ACCESS on XP (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: ws Created 5 years, 3 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 | util/win/xp_compat.h » ('j') | util/win/xp_compat.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/scoped_process_suspend_test.cc
diff --git a/util/win/scoped_process_suspend_test.cc b/util/win/scoped_process_suspend_test.cc
index 98f06433b0910a37b0fa3f01bfdf52d18d002a71..8841f90ccb3ce7eb0862a898353abf4177a92202 100644
--- a/util/win/scoped_process_suspend_test.cc
+++ b/util/win/scoped_process_suspend_test.cc
@@ -21,6 +21,7 @@
#include "gtest/gtest.h"
#include "test/win/win_child_process.h"
+#include "util/win/xp_compat.h"
namespace crashpad {
namespace test {
@@ -45,7 +46,8 @@ bool SuspendCountMatches(HANDLE process, DWORD desired_suspend_count) {
sizeof(te.th32OwnerProcessID) &&
te.th32OwnerProcessID == process_id) {
ScopedKernelHANDLE thread(
- OpenThread(THREAD_ALL_ACCESS, false, te.th32ThreadID));
+ OpenThread(kXPThreadAllAccess, false, te.th32ThreadID));
+ EXPECT_TRUE(thread.is_valid());
Mark Mentovai 2015/09/11 23:03:33 ASSERT_TRUE()? Otherwise everything that follows i
scottmg 2015/09/11 23:32:52 Yeah, I just hate ASSERT because there's no "retur
Mark Mentovai 2015/09/11 23:36:28 scottmg wrote:
DWORD result = SuspendThread(thread.get());
EXPECT_NE(result, static_cast<DWORD>(-1));
if (result != static_cast<DWORD>(-1))
« no previous file with comments | « no previous file | util/win/xp_compat.h » ('j') | util/win/xp_compat.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698