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

Unified Diff: base/file_util_win.cc

Issue 6660017: Merge 77575 - The code to validate whether plugin dlls are 32 bit failed for ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/696/src/
Patch Set: Created 9 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 77577)
+++ base/file_util_win.cc (working copy)
@@ -972,10 +972,8 @@
if (length_ == INVALID_FILE_SIZE)
return false;
- // length_ value comes from GetFileSize() above. GetFileSize() returns DWORD,
- // therefore the cast here is safe.
file_mapping_ = ::CreateFileMapping(file_, NULL, PAGE_READONLY | flags,
- 0, static_cast<DWORD>(length_), NULL);
+ 0, 0, NULL);
if (!file_mapping_) {
// According to msdn, system error codes are only reserved up to 15999.
// http://msdn.microsoft.com/en-us/library/ms681381(v=VS.85).aspx.
@@ -985,7 +983,7 @@
}
data_ = static_cast<uint8*>(
- ::MapViewOfFile(file_mapping_, FILE_MAP_READ, 0, 0, length_));
+ ::MapViewOfFile(file_mapping_, FILE_MAP_READ, 0, 0, 0));
if (!data_) {
UMA_HISTOGRAM_ENUMERATION("MemoryMappedFile.MapViewOfFile",
logging::GetLastSystemErrorCode(), 16000);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698