mirror of
https://github.com/chromium/crashpad.git
synced 2025-01-14 01:08:01 +08:00
Replace std::unique_ptr with base::HeapArray in process_memory.cc
Bug: crashpad:326459219 Change-Id: Ic5e252285ed1fb1769eef67ddaea00a830d0ee6a Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/5535006 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Arthur Wang <wuwang@chromium.org>
This commit is contained in:
parent
1174aa4fc3
commit
4f99326c2e
@ -19,8 +19,8 @@
|
|||||||
#include <uuid/uuid.h>
|
#include <uuid/uuid.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <memory>
|
|
||||||
|
|
||||||
|
#include "base/containers/heap_array.h"
|
||||||
#include "snapshot/mac/process_types/internal.h"
|
#include "snapshot/mac/process_types/internal.h"
|
||||||
#include "util/process/process_memory_mac.h"
|
#include "util/process/process_memory_mac.h"
|
||||||
|
|
||||||
@ -245,8 +245,9 @@ inline void Assign<UInt64Array4, UInt32Array4>(UInt64Array4* destination,
|
|||||||
mach_vm_address_t address, \
|
mach_vm_address_t address, \
|
||||||
size_t count, \
|
size_t count, \
|
||||||
struct_name* generic) { \
|
struct_name* generic) { \
|
||||||
std::unique_ptr<T[]> specific(new T[count]); \
|
auto specific = base::HeapArray<T>::Uninit(count); \
|
||||||
if (!T::ReadArrayInto(process_reader, address, count, &specific[0])) { \
|
if (!T::ReadArrayInto( \
|
||||||
|
process_reader, address, specific.size(), specific.data())) { \
|
||||||
return false; \
|
return false; \
|
||||||
} \
|
} \
|
||||||
for (size_t index = 0; index < count; ++index) { \
|
for (size_t index = 0; index < count; ++index) { \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user