| OLD | NEW |
| 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 16 matching lines...) Expand all Loading... |
| 27 #include "util/file/string_file.h" | 27 #include "util/file/string_file.h" |
| 28 | 28 |
| 29 namespace crashpad { | 29 namespace crashpad { |
| 30 namespace test { | 30 namespace test { |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 const MinidumpModuleCrashpadInfoList* MinidumpModuleCrashpadInfoListAtStart( | 33 const MinidumpModuleCrashpadInfoList* MinidumpModuleCrashpadInfoListAtStart( |
| 34 const std::string& file_contents, | 34 const std::string& file_contents, |
| 35 size_t count) { | 35 size_t count) { |
| 36 MINIDUMP_LOCATION_DESCRIPTOR location_descriptor; | 36 MINIDUMP_LOCATION_DESCRIPTOR location_descriptor; |
| 37 location_descriptor.DataSize = sizeof(MinidumpModuleCrashpadInfoList) + | 37 location_descriptor.DataSize = |
| 38 count * sizeof(MinidumpModuleCrashpadInfoLink); | 38 static_cast<uint32_t>(sizeof(MinidumpModuleCrashpadInfoList) + |
| 39 count * sizeof(MinidumpModuleCrashpadInfoLink)); |
| 39 location_descriptor.Rva = 0; | 40 location_descriptor.Rva = 0; |
| 40 | 41 |
| 41 const MinidumpModuleCrashpadInfoList* list = | 42 const MinidumpModuleCrashpadInfoList* list = |
| 42 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>( | 43 MinidumpWritableAtLocationDescriptor<MinidumpModuleCrashpadInfoList>( |
| 43 file_contents, location_descriptor); | 44 file_contents, location_descriptor); |
| 44 if (!list) { | 45 if (!list) { |
| 45 return nullptr; | 46 return nullptr; |
| 46 } | 47 } |
| 47 | 48 |
| 48 if (list->count != count) { | 49 if (list->count != count) { |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 | 462 |
| 462 const MinidumpSimpleStringDictionary* simple_annotations_3 = | 463 const MinidumpSimpleStringDictionary* simple_annotations_3 = |
| 463 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( | 464 MinidumpWritableAtLocationDescriptor<MinidumpSimpleStringDictionary>( |
| 464 string_file.string(), module_3->simple_annotations); | 465 string_file.string(), module_3->simple_annotations); |
| 465 EXPECT_FALSE(simple_annotations_3); | 466 EXPECT_FALSE(simple_annotations_3); |
| 466 } | 467 } |
| 467 | 468 |
| 468 } // namespace | 469 } // namespace |
| 469 } // namespace test | 470 } // namespace test |
| 470 } // namespace crashpad | 471 } // namespace crashpad |
| OLD | NEW |