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

Unified Diff: third_party/crashpad/crashpad/snapshot/mac/process_types.cc

Issue 2236493004: Update Crashpad to 56b14bceefcec03fc11b3222c435522922f65640 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: third_party/crashpad/crashpad/snapshot/mac/process_types.cc
diff --git a/third_party/crashpad/crashpad/snapshot/mac/process_types.cc b/third_party/crashpad/crashpad/snapshot/mac/process_types.cc
index a34e4d60c496d83a8bbb878848619df8703704cc..53d89035de390d99784ec2bfc20619e7a7b58c7d 100644
--- a/third_party/crashpad/crashpad/snapshot/mac/process_types.cc
+++ b/third_party/crashpad/crashpad/snapshot/mac/process_types.cc
@@ -36,44 +36,39 @@ inline void Assign(DestinationType* destination, const SourceType& source) {
*destination = source;
}
-template <>
-inline void Assign<process_types::internal::Reserved64Only64,
- process_types::internal::Reserved64Only32>(
- process_types::internal::Reserved64Only64* destination,
- const process_types::internal::Reserved64Only32& source) {
- // Reserved64Only32 carries no data.
- *destination = 0;
+template <typename Type>
+inline void Assign(Type* destination, const Type& source) {
+ memcpy(destination, &source, sizeof(source));
}
-using CharArray16 = char[16];
template <>
-inline void Assign<CharArray16, CharArray16>(CharArray16* destination,
- const CharArray16& source) {
- memcpy(destination, &source, sizeof(source));
+inline void Assign<process_types::internal::Reserved32_64Only64,
+ process_types::internal::Reserved32_64Only32>(
+ process_types::internal::Reserved32_64Only64* destination,
+ const process_types::internal::Reserved32_64Only32& source) {
+ // Reserved32_64Only32 carries no data.
+ *destination = 0;
}
-using UInt64Array16 = uint64_t[16];
template <>
-inline void Assign<UInt64Array16, UInt64Array16>(UInt64Array16* destination,
- const UInt64Array16& source) {
- memcpy(destination, &source, sizeof(source));
+inline void Assign<process_types::internal::Reserved64_64Only64,
+ process_types::internal::Reserved64_64Only32>(
+ process_types::internal::Reserved64_64Only64* destination,
+ const process_types::internal::Reserved64_64Only32& source) {
+ // Reserved64_64Only32 carries no data.
+ *destination = 0;
}
-using UInt32Array16 = uint32_t[16];
+using UInt32Array4 = uint32_t[4];
+using UInt64Array4 = uint64_t[4];
template <>
-inline void Assign<UInt64Array16, UInt32Array16>(UInt64Array16* destination,
- const UInt32Array16& source) {
+inline void Assign<UInt64Array4, UInt32Array4>(UInt64Array4* destination,
+ const UInt32Array4& source) {
for (size_t index = 0; index < arraysize(source); ++index) {
(*destination)[index] = source[index];
}
}
-template <>
-inline void Assign<uuid_t, uuid_t>(uuid_t* destination, const uuid_t& source) {
- // uuid_t is a type alias for unsigned char[16].
- memcpy(destination, &source, sizeof(source));
-}
-
} // namespace
} // namespace crashpad

Powered by Google App Engine
This is Rietveld 408576698