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

Side by Side Diff: snapshot/mac/process_reader.h

Issue 989713002: snapshot/mac: MachOImageAnnotationsReader test shouldn’t crash with a nullptr ProcessReader::Module (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: 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 unified diff | Download patch
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 Module(); 77 Module();
78 ~Module(); 78 ~Module();
79 79
80 //! \brief The pathname used to load the module from disk. 80 //! \brief The pathname used to load the module from disk.
81 std::string name; 81 std::string name;
82 82
83 //! \brief An image reader for the module. 83 //! \brief An image reader for the module.
84 //! 84 //!
85 //! The lifetime of this MachOImageReader is scoped to the lifetime of the 85 //! The lifetime of this MachOImageReader is scoped to the lifetime of the
86 //! ProcessReader that created it. 86 //! ProcessReader that created it.
87 //!
88 //! This field may be `nullptr` if a reader could not be created for the
89 //! module.
87 const MachOImageReader* reader; 90 const MachOImageReader* reader;
88 91
89 //! \brief The module’s timestamp. 92 //! \brief The module’s timestamp.
90 //! 93 //!
91 //! This field will be `0` if its value cannot be determined. It can only be 94 //! This field will be `0` if its value cannot be determined. It can only be
92 //! determined for images that are loaded by dyld, so it will be `0` for the 95 //! determined for images that are loaded by dyld, so it will be `0` for the
93 //! main executable and for dyld itself. 96 //! main executable and for dyld itself.
94 time_t timestamp; 97 time_t timestamp;
95 }; 98 };
96 99
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 230
228 bool initialized_threads_; 231 bool initialized_threads_;
229 bool initialized_modules_; 232 bool initialized_modules_;
230 233
231 DISALLOW_COPY_AND_ASSIGN(ProcessReader); 234 DISALLOW_COPY_AND_ASSIGN(ProcessReader);
232 }; 235 };
233 236
234 } // namespace crashpad 237 } // namespace crashpad
235 238
236 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_READER_H_ 239 #endif // CRASHPAD_SNAPSHOT_MAC_PROCESS_READER_H_
OLDNEW
« no previous file with comments | « snapshot/mac/mach_o_image_annotations_reader_test.cc ('k') | snapshot/mac/process_reader_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698