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

Side by Side Diff: minidump/minidump_memory_writer.cc

Issue 681313005: minidump: Use decltype(object) instead of typeof(object) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « no previous file | minidump/minidump_module_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 } 69 }
70 70
71 bool MinidumpMemoryWriter::WillWriteAtOffsetImpl(off_t offset) { 71 bool MinidumpMemoryWriter::WillWriteAtOffsetImpl(off_t offset) {
72 DCHECK_EQ(state(), kStateFrozen); 72 DCHECK_EQ(state(), kStateFrozen);
73 73
74 // There will always be at least one registered descriptor, the one for this 74 // There will always be at least one registered descriptor, the one for this
75 // object’s own memory_descriptor_ field. 75 // object’s own memory_descriptor_ field.
76 DCHECK_GE(registered_memory_descriptors_.size(), 1u); 76 DCHECK_GE(registered_memory_descriptors_.size(), 1u);
77 77
78 uint64_t base_address = MemoryRangeBaseAddress(); 78 uint64_t base_address = MemoryRangeBaseAddress();
79 typeof(registered_memory_descriptors_[0]->StartOfMemoryRange) local_address; 79 decltype(registered_memory_descriptors_[0]->StartOfMemoryRange) local_address;
80 if (!AssignIfInRange(&local_address, base_address)) { 80 if (!AssignIfInRange(&local_address, base_address)) {
81 LOG(ERROR) << "base_address " << base_address << " out of range"; 81 LOG(ERROR) << "base_address " << base_address << " out of range";
82 return false; 82 return false;
83 } 83 }
84 84
85 for (MINIDUMP_MEMORY_DESCRIPTOR* memory_descriptor : 85 for (MINIDUMP_MEMORY_DESCRIPTOR* memory_descriptor :
86 registered_memory_descriptors_) { 86 registered_memory_descriptors_) {
87 memory_descriptor->StartOfMemoryRange = local_address; 87 memory_descriptor->StartOfMemoryRange = local_address;
88 } 88 }
89 89
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 179 }
180 180
181 return file_writer->WriteIoVec(&iovecs); 181 return file_writer->WriteIoVec(&iovecs);
182 } 182 }
183 183
184 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const { 184 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const {
185 return kMinidumpStreamTypeMemoryList; 185 return kMinidumpStreamTypeMemoryList;
186 } 186 }
187 187
188 } // namespace crashpad 188 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_module_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698