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

Side by Side Diff: minidump/minidump_handle_writer.cc

Issue 1421473005: Fix mac after https://codereview.chromium.org/1419623003/ (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . Created 5 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
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 MINIDUMP_HANDLE_DESCRIPTOR& descriptor = handle_descriptors_[i]; 43 MINIDUMP_HANDLE_DESCRIPTOR& descriptor = handle_descriptors_[i];
44 44
45 descriptor.Handle = handle_snapshot.handle; 45 descriptor.Handle = handle_snapshot.handle;
46 46
47 if (handle_snapshot.type_name.empty()) { 47 if (handle_snapshot.type_name.empty()) {
48 descriptor.TypeNameRva = 0; 48 descriptor.TypeNameRva = 0;
49 } else { 49 } else {
50 // TODO(scottmg): There is often a number of repeated type names here, the 50 // TODO(scottmg): There is often a number of repeated type names here, the
51 // strings ought to be pooled. 51 // strings ought to be pooled.
52 strings_.push_back(new internal::MinidumpUTF16StringWriter()); 52 strings_.push_back(new internal::MinidumpUTF16StringWriter());
53 strings_.back()->SetUTF16(handle_snapshot.type_name); 53 strings_.back()->SetUTF8(handle_snapshot.type_name);
54 strings_.back()->RegisterRVA(&descriptor.TypeNameRva); 54 strings_.back()->RegisterRVA(&descriptor.TypeNameRva);
55 } 55 }
56 56
57 descriptor.ObjectNameRva = 0; 57 descriptor.ObjectNameRva = 0;
58 descriptor.Attributes = handle_snapshot.attributes; 58 descriptor.Attributes = handle_snapshot.attributes;
59 descriptor.GrantedAccess = handle_snapshot.granted_access; 59 descriptor.GrantedAccess = handle_snapshot.granted_access;
60 descriptor.HandleCount = handle_snapshot.handle_count; 60 descriptor.HandleCount = handle_snapshot.handle_count;
61 descriptor.PointerCount = handle_snapshot.pointer_count; 61 descriptor.PointerCount = handle_snapshot.pointer_count;
62 } 62 }
63 } 63 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 } 106 }
107 107
108 return file_writer->WriteIoVec(&iovecs); 108 return file_writer->WriteIoVec(&iovecs);
109 } 109 }
110 110
111 MinidumpStreamType MinidumpHandleDataWriter::StreamType() const { 111 MinidumpStreamType MinidumpHandleDataWriter::StreamType() const {
112 return kMinidumpStreamTypeHandleData; 112 return kMinidumpStreamTypeHandleData;
113 } 113 }
114 114
115 } // namespace crashpad 115 } // namespace crashpad
OLDNEW
« no previous file with comments | « no previous file | minidump/minidump_handle_writer_test.cc » ('j') | minidump/minidump_handle_writer_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698