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

Unified Diff: minidump/minidump_writable.cc

Issue 983103004: win: fixes for Windows x64 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: mac Created 5 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 | « minidump/minidump_writable.h ('k') | minidump/minidump_writable_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_writable.cc
diff --git a/minidump/minidump_writable.cc b/minidump/minidump_writable.cc
index 5925a885e99a581634cde54ff4fe8eda9722c37e..8b73906080d8beabeb3b39d00cf026a2c119a30f 100644
--- a/minidump/minidump_writable.cc
+++ b/minidump/minidump_writable.cc
@@ -43,7 +43,7 @@ bool MinidumpWritable::WriteEverything(FileWriterInterface* file_writer) {
DCHECK_EQ(state_, kStateFrozen);
- off_t offset = 0;
+ FileOffset offset = 0;
std::vector<MinidumpWritable*> write_sequence;
size_t size = WillWriteAtOffset(kPhaseEarly, &offset, &write_sequence);
if (size == kInvalidSize) {
@@ -124,9 +124,9 @@ MinidumpWritable::Phase MinidumpWritable::WritePhase() {
size_t MinidumpWritable::WillWriteAtOffset(
Phase phase,
- off_t* offset,
+ FileOffset* offset,
std::vector<MinidumpWritable*>* write_sequence) {
- off_t local_offset = *offset;
+ FileOffset local_offset = *offset;
CHECK_GE(local_offset, 0);
size_t leading_pad_bytes_this_phase;
@@ -218,10 +218,10 @@ size_t MinidumpWritable::WillWriteAtOffset(
std::vector<MinidumpWritable*> children = Children();
for (MinidumpWritable* child : children) {
// Use “auto” here because it’s impossible to know whether size_t (size) or
- // off_t (local_offset) is the wider type, and thus what type the result of
- // adding these two variables will have.
+ // FileOffset (local_offset) is the wider type, and thus what type the
+ // result of adding these two variables will have.
auto unaligned_child_offset = local_offset + size;
- off_t child_offset;
+ FileOffset child_offset;
if (!AssignIfInRange(&child_offset, unaligned_child_offset)) {
LOG(ERROR) << "offset " << unaligned_child_offset << " out of range";
return kInvalidSize;
@@ -239,7 +239,7 @@ size_t MinidumpWritable::WillWriteAtOffset(
return leading_pad_bytes_this_phase + size;
}
-bool MinidumpWritable::WillWriteAtOffsetImpl(off_t offset) {
+bool MinidumpWritable::WillWriteAtOffsetImpl(FileOffset offset) {
return true;
}
« no previous file with comments | « minidump/minidump_writable.h ('k') | minidump/minidump_writable_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698