Index: minidump/test/minidump_writable_test_util.cc |
diff --git a/minidump/test/minidump_writable_test_util.cc b/minidump/test/minidump_writable_test_util.cc |
index ef00f40a610f3bed68d7219d11d01225a9ad3bc7..c8ea4f44c91ed0a42f23d9b46b697608bd6b352b 100644 |
--- a/minidump/test/minidump_writable_test_util.cc |
+++ b/minidump/test/minidump_writable_test_util.cc |
@@ -181,6 +181,14 @@ struct MinidumpThreadListTraits { |
} |
}; |
+struct MinidumpHandleDataStreamTraits { |
+ using ListType = MINIDUMP_HANDLE_DATA_STREAM; |
+ enum : size_t { kElementSize = sizeof(MINIDUMP_HANDLE_DESCRIPTOR) }; |
+ static size_t ElementCount(const ListType* list) { |
+ return static_cast<size_t>(list->NumberOfDescriptors); |
+ } |
+}; |
+ |
struct MinidumpMemoryInfoListTraits { |
using ListType = MINIDUMP_MEMORY_INFO_LIST; |
enum : size_t { kElementSize = sizeof(MINIDUMP_MEMORY_INFO) }; |
@@ -253,6 +261,14 @@ const MINIDUMP_THREAD_LIST* MinidumpWritableAtLocationDescriptor< |
} |
template <> |
+const MINIDUMP_HANDLE_DATA_STREAM* MinidumpWritableAtLocationDescriptor< |
+ MINIDUMP_HANDLE_DATA_STREAM>(const std::string& file_contents, |
+ const MINIDUMP_LOCATION_DESCRIPTOR& location) { |
+ return MinidumpListAtLocationDescriptor<MinidumpHandleDataStreamTraits>( |
+ file_contents, location); |
+} |
+ |
+template <> |
const MINIDUMP_MEMORY_INFO_LIST* MinidumpWritableAtLocationDescriptor< |
MINIDUMP_MEMORY_INFO_LIST>(const std::string& file_contents, |
const MINIDUMP_LOCATION_DESCRIPTOR& location) { |