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

Unified Diff: base/memory/shared_memory_unittest.cc

Issue 92173002: Merge 237541 "Revert of https://codereview.chromium.org/71013004/" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1721/src/
Patch Set: Created 7 years, 1 month 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 | « base/base.gyp ('k') | base/process/launch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/shared_memory_unittest.cc
===================================================================
--- base/memory/shared_memory_unittest.cc (revision 237598)
+++ base/memory/shared_memory_unittest.cc (working copy)
@@ -425,18 +425,16 @@
EXPECT_EQ(NULL, MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, 0))
<< "Shouldn't be able to map memory writable.";
- HANDLE temp_handle;
- BOOL rv = ::DuplicateHandle(GetCurrentProcess(),
+ base::win::ScopedHandle writable_handle;
+ EXPECT_EQ(0,
+ ::DuplicateHandle(GetCurrentProcess(),
handle,
GetCurrentProcess,
- &temp_handle,
+ writable_handle.Receive(),
FILE_MAP_ALL_ACCESS,
false,
- 0);
- EXPECT_EQ(FALSE, rv)
+ 0))
<< "Shouldn't be able to duplicate the handle into a writable one.";
- if (rv)
- base::win::ScopedHandle writable_handle(temp_handle);
#else
#error Unexpected platform; write a test that tries to make 'handle' writable.
#endif // defined(OS_POSIX) || defined(OS_WIN)
« no previous file with comments | « base/base.gyp ('k') | base/process/launch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698