summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 23:16:04 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-01 23:16:04 +0000
commit568db97e852d5bec430f55575e2fda6d9510ccd7 (patch)
tree4baeb6e8a00accc1c02626d939ba1b24c8ce6676 /base
parenta718ac94e423c9abe89593b7f0244d3b24a182dd (diff)
downloadchromium_src-568db97e852d5bec430f55575e2fda6d9510ccd7.zip
chromium_src-568db97e852d5bec430f55575e2fda6d9510ccd7.tar.gz
chromium_src-568db97e852d5bec430f55575e2fda6d9510ccd7.tar.bz2
Fix CloseHandle blunder. I was thinking that the handle would be closed by Set, but of course I need to close the handle before the CreateFile call... doh!
Review URL: http://codereview.chromium.org/13027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/test_file_util_win.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/test_file_util_win.cc b/base/test_file_util_win.cc
index 5f6d7c7..6c4dc05 100644
--- a/base/test_file_util_win.cc
+++ b/base/test_file_util_win.cc
@@ -84,6 +84,7 @@ bool EvictFileFromSystemCache(const wchar_t* file) {
// The size of the file isn't a multiple of the page size, so we'll have
// to open the file again, this time without the FILE_FLAG_NO_BUFFERING
// flag and use SetEndOfFile to mark EOF.
+ file_handle.Set(NULL);
file_handle.Set(CreateFile(file, GENERIC_WRITE, 0, NULL, OPEN_EXISTING,
0, NULL));
CHECK(SetFilePointer(file_handle, total_bytes, NULL, FILE_BEGIN) !=