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

Side by Side Diff: minidump/minidump_memory_writer.cc

Issue 896663006: win: Resolve zero-length array errors on MSVC (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@minidump-comp
Patch Set: fixes Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « minidump/minidump_memory_writer.h ('k') | minidump/minidump_module_writer.h » ('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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 // Memory dumps are large and are unlikely to be consumed in their entirety. 155 // Memory dumps are large and are unlikely to be consumed in their entirety.
156 // Data accesses are expected to be sparse and sporadic, and are expected to 156 // Data accesses are expected to be sparse and sporadic, and are expected to
157 // occur after all of the other structural and informational data from the 157 // occur after all of the other structural and informational data from the
158 // minidump file has been read. Put memory dumps at the end of the minidump 158 // minidump file has been read. Put memory dumps at the end of the minidump
159 // file to improve spatial locality. 159 // file to improve spatial locality.
160 return kPhaseLate; 160 return kPhaseLate;
161 } 161 }
162 162
163 MinidumpMemoryListWriter::MinidumpMemoryListWriter() 163 MinidumpMemoryListWriter::MinidumpMemoryListWriter()
164 : MinidumpStreamWriter(), 164 : MinidumpStreamWriter(),
165 memory_list_base_(),
166 memory_writers_(), 165 memory_writers_(),
167 children_() { 166 children_(),
167 memory_list_base_() {
168 } 168 }
169 169
170 MinidumpMemoryListWriter::~MinidumpMemoryListWriter() { 170 MinidumpMemoryListWriter::~MinidumpMemoryListWriter() {
171 } 171 }
172 172
173 void MinidumpMemoryListWriter::AddFromSnapshot( 173 void MinidumpMemoryListWriter::AddFromSnapshot(
174 const std::vector<const MemorySnapshot*>& memory_snapshots) { 174 const std::vector<const MemorySnapshot*>& memory_snapshots) {
175 DCHECK_EQ(state(), kStateMutable); 175 DCHECK_EQ(state(), kStateMutable);
176 176
177 for (const MemorySnapshot* memory_snapshot : memory_snapshots) { 177 for (const MemorySnapshot* memory_snapshot : memory_snapshots) {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 } 251 }
252 252
253 return file_writer->WriteIoVec(&iovecs); 253 return file_writer->WriteIoVec(&iovecs);
254 } 254 }
255 255
256 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const { 256 MinidumpStreamType MinidumpMemoryListWriter::StreamType() const {
257 return kMinidumpStreamTypeMemoryList; 257 return kMinidumpStreamTypeMemoryList;
258 } 258 }
259 259
260 } // namespace crashpad 260 } // namespace crashpad
OLDNEW
« no previous file with comments | « minidump/minidump_memory_writer.h ('k') | minidump/minidump_module_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698