diff options
author | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 08:23:31 +0000 |
---|---|---|
committer | hashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-27 08:23:31 +0000 |
commit | ecb10fa1d0b06ba322e0782a1becb67730f69707 (patch) | |
tree | e1b944d00a329f9ef0837870a80d09bd01cfa310 /base/memory | |
parent | 4e5a81b5606ea6bd7be2f631e52e93d0d3b23902 (diff) | |
download | chromium_src-ecb10fa1d0b06ba322e0782a1becb67730f69707.zip chromium_src-ecb10fa1d0b06ba322e0782a1becb67730f69707.tar.gz chromium_src-ecb10fa1d0b06ba322e0782a1becb67730f69707.tar.bz2 |
Revert of https://codereview.chromium.org/71013004/
Reason for revert: Causing compile failure in chrome_util.cc on "Google Chrome Win" http://build.chromium.org/p/chromium.chrome/builders/Google%20Chrome%20Win/builds/21803
TBR=cpu@chromium.org,jvoung@chromium.org,thakis@chromium.org,sergeyu@chromium.org,grt@chromium.org,gene@chromium.org,youngki@chromium.org,rvargas@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/90963002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@237541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/memory')
-rw-r--r-- | base/memory/shared_memory_unittest.cc | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/base/memory/shared_memory_unittest.cc b/base/memory/shared_memory_unittest.cc index a1aa9e32..2b3ad7a 100644 --- a/base/memory/shared_memory_unittest.cc +++ b/base/memory/shared_memory_unittest.cc @@ -425,18 +425,16 @@ TEST(SharedMemoryTest, ShareReadOnly) { 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) |