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

Unified Diff: base/files/memory_mapped_file.cc

Issue 2939073002: Don't realize existing parts of an extended memory-mapped file. (Closed)
Patch Set: Created 3 years, 6 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 | base/files/memory_mapped_file_posix.cc » ('j') | base/files/memory_mapped_file_posix.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/memory_mapped_file.cc
diff --git a/base/files/memory_mapped_file.cc b/base/files/memory_mapped_file.cc
index 67890d68855cb810a086da788d2f046f78240d25..45a09a01aeb97eb3e06e84ac98253af83d4df0c1 100644
--- a/base/files/memory_mapped_file.cc
+++ b/base/files/memory_mapped_file.cc
@@ -71,6 +71,7 @@ bool MemoryMappedFile::Initialize(File file,
Access access) {
switch (access) {
case READ_WRITE_EXTEND:
+ DCHECK(Region::kWholeFile != region);
// Ensure that the extended size is within limits of File.
if (region.size > std::numeric_limits<int64_t>::max() - region.offset) {
DLOG(ERROR) << "Region bounds exceed maximum for base::File.";
« no previous file with comments | « no previous file | base/files/memory_mapped_file_posix.cc » ('j') | base/files/memory_mapped_file_posix.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698