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

Unified Diff: base/shared_memory_posix.cc

Issue 347012: Add a CHECK() around the SharedMemory ftruncate() call to finger it as a cras... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/shared_memory_posix.cc
===================================================================
--- base/shared_memory_posix.cc (revision 30139)
+++ base/shared_memory_posix.cc (working copy)
@@ -203,8 +203,10 @@
return false;
const size_t current_size = stat.st_size;
if (current_size != size) {
- if (ftruncate(fileno(fp), size) != 0)
- return false;
+ // TODO(hawk): When finished with bug 16371, revert this CHECK() to:
+ // if (ftruncate(fileno(fp), size) != 0)
+ // return false;
+ CHECK(!ftruncate(fileno(fp), size));
if (fseeko(fp, size, SEEK_SET) != 0)
return false;
}
« 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